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:
Reece H. Dunn
2017-09-12 07:17:46 +01:00
parent d19da58fa0
commit 988db184ea
+1 -1
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