Merge in SNORT/snort3 from ~JMARTINC/snort3:cov_fix to master
Squashed commit of the following:
commit
cc8ae063c7b71257df2f61550fbfb2d8819ee392
Author: Juan David Martin Castillo <jmartinc@cisco.com>
Date: Wed Nov 26 12:54:25 2025 -0500
http_inspect: fix coverity error
//Delete vba_buf if decompression could not happen
if (!vba_buf_len)
+ {
delete[] vba_buf;
+ vba_buf = nullptr;
+ }
}
// Beginning function of ole file processing.
{
if ((compression == CMP_GZIP) || (compression == CMP_DEFLATE))
{
- compress_stream = new z_stream;
+ compress_stream = new z_stream();
compress_stream->zalloc = Z_NULL;
compress_stream->zfree = Z_NULL;
compress_stream->next_in = Z_NULL;
return js_ctx;
delete js_ctx;
- js_ctx = nullptr;
}
JSNormConfig* jsn_config = get_inspection_policy()->jsn_config;
if (buf && buf_len)
decompressed_vba_data.set(buf_len, buf, true);
else
+ {
decompressed_vba_data.set(STAT_NOT_PRESENT);
-
+ delete[] buf;
+ }
return decompressed_vba_data;
}
// __STRDUMP_ENABLE__
std::string token;
-
while (ss >> token)
{
+ // coverity[tainted_scalar]
const uint16_t ucode = strtol(token.c_str(), nullptr, 16);
map[ucode] = strtol(token.c_str()+5, nullptr, 16);
}