mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 18:33:16 +00:00
cid 12188 - fix error state for parsing yara hex strings
This commit is contained in:
parent
b187a2c330
commit
628c2bbb19
1 changed files with 2 additions and 0 deletions
|
@ -3077,6 +3077,7 @@ static char *parse_yara_hex_string(YR_STRING *string, int *ret)
|
|||
if ((ovr = strchr(ovr, '}')))
|
||||
*ovr = ']';
|
||||
else {
|
||||
free(res);
|
||||
if (ret) *ret = CL_EMALFDB;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3087,6 +3088,7 @@ static char *parse_yara_hex_string(YR_STRING *string, int *ret)
|
|||
if ((ovr = strrchr(res, '{')))
|
||||
*ovr = '[';
|
||||
else {
|
||||
free(res);
|
||||
if (ret) *ret = CL_EMALFDB;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue