Topics

[espeak-ng:master] reported: espeak android latest pree build crashes with the folowing hindi text #github


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #831 espeak android latest pree build crashes with the folowing hindi text
By jaacoppi:

What do you think, am I on to something here?

The loop that crashes is here: https://github.com/espeak-ng/espeak-ng/blob/5ffcc7c6f12b13481169d54c72e8b0543c78169e/src/libespeak-ng/synthdata.c#L477-L483

It crashes because repeated plist--; lead to undefined results. The loop should 1) be rewritten to use proper for syntax instead of being an endless loop with an if ... break; 2) check the content is valid (i.e. don't rewind past plist3[0]

Why is plist3 wrong in the first place? See the warning written here: https://github.com/espeak-ng/espeak-ng/blob/5ffcc7c6f12b13481169d54c72e8b0543c78169e/src/libespeak-ng/phonemelist.c#L313

The call to InterpretPhoneme with the faulty plist3 follows shortly after that warning.