mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 18:33:16 +00:00
HTML-normalization valgrind fix for Alpine
Valgrind reports uninitialized `tag` stack buffer being used. While this appears to be a false positive, it can't hurt to initialize this and similar buffers in this function.
This commit is contained in:
parent
b35d1e1bec
commit
42ac62edd2
1 changed files with 9 additions and 0 deletions
|
@ -673,6 +673,15 @@ static int cli_html_normalise(int fd, m_area_t *m_area, const char *dirname, tag
|
|||
uint32_t mbchar = 0;
|
||||
uint32_t mbchar2 = 0;
|
||||
|
||||
/*
|
||||
* Initialize stack buffers.
|
||||
*/
|
||||
memset(filename, 0, sizeof(filename));
|
||||
memset(tag, 0, sizeof(tag));
|
||||
memset(tag_arg, 0, sizeof(tag_arg));
|
||||
memset(tag_val, 0, sizeof(tag_val));
|
||||
memset(entity_val, 0, sizeof(entity_val));
|
||||
|
||||
tag_args.scanContents = 0; /* do we need to store the contents of <a></a>?*/
|
||||
contents.pos = 0;
|
||||
if (!m_area) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue