mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Fix a null pointer dereference in compile_rule(compiledict.c). [Coverity]
This commit is contained in:
@@ -1141,8 +1141,8 @@ static char *compile_rule(char *input)
|
||||
len += (strlen(rule_post)+1);
|
||||
}
|
||||
output[len++] = 0;
|
||||
prule = (char *)malloc(len);
|
||||
memcpy(prule, output, len);
|
||||
if ((prule = (char *)malloc(len)) != NULL)
|
||||
memcpy(prule, output, len);
|
||||
return prule;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user