mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-15 01:54:46 +00:00
Prevent invalid access to word in LookupDictList.
Clang static analysis reports this as several 'Result of operation is garbage or undefined' errors.
This commit is contained in:
@@ -2894,7 +2894,7 @@ int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *f
|
||||
found = word2 + len;
|
||||
}
|
||||
|
||||
if (found == 0) {
|
||||
if (found == 0 && length >= 2) {
|
||||
ph_out[0] = 0;
|
||||
|
||||
// try modifications to find a recognised word
|
||||
|
||||
Reference in New Issue
Block a user