Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence confusing HTML parser warning message #1252

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libclamav/htmlnorm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ static bool cli_html_normalise(cli_ctx *ctx, int fd, m_area_t *m_area, const cha
style_end = ptr - strlen("</style>");

if (style_end < style_begin) {
cli_errmsg("cli_html_normalise: style chunk size underflow\n");
cli_dbgmsg("cli_html_normalise: style chunk size underflow\n");
goto done;
}

Expand Down Expand Up @@ -1830,7 +1830,7 @@ static bool cli_html_normalise(cli_ctx *ctx, int fd, m_area_t *m_area, const cha

if (in_tag == TAG_STYLE) {
if (ptr < style_begin) {
cli_errmsg("cli_html_normalise: style chunk size underflow\n");
cli_dbgmsg("cli_html_normalise: style chunk size underflow\n");
goto done;
}

Expand Down Expand Up @@ -1882,7 +1882,7 @@ static bool cli_html_normalise(cli_ctx *ctx, int fd, m_area_t *m_area, const cha
}

if (style_buff != NULL) {
// Found contents of <style> ... </style> block.
// Found contents of <style> ... </style> block.
// Search it for images embedded in the CSS.
cl_error_t ret = html_style_block_handler(ctx, (const char *)style_buff);
if (CL_SUCCESS != ret) {
Expand Down
Loading