From 8a777385a8e925016e81cee196c6a417caf7253f Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Tue, 12 Sep 2017 07:36:54 +0100 Subject: [PATCH] Use wflags to access wtab->flags in LookupDict2. Clang static analysis reports a 'Dereference of null pointer' error when accessing wtab->flags. This is properly guarded against when setting the wflags variable, so use that variable instead. --- src/libespeak-ng/dictionary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index 40d06c88..c15bff49 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -2719,7 +2719,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor continue; } - if ((dictionary_flags2 & FLAG_ATSTART) && !(wtab->flags & FLAG_FIRST_WORD)) { + if ((dictionary_flags2 & FLAG_ATSTART) && !(wflags & FLAG_FIRST_WORD)) { // only use this pronunciation if it's the first word of a clause continue; }