Browse Source

Prevent invalid access to word in LookupDictList.

Clang static analysis reports this as several 'Result of operation
is garbage or undefined' errors.
master
Reece H. Dunn 7 years ago
parent
commit
988db184ea
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/libespeak-ng/dictionary.c

+ 1
- 1
src/libespeak-ng/dictionary.c View File

@@ -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

Loading…
Cancel
Save