GNOME Bugzilla – Bug 305489
Festival driver in gnome-speech-0.3.7 seg faults
Last modified: 2005-09-27 10:23:26 UTC
Version details: 0.3.7 Download gnome-speech-0.3.7. Build/install it on Fedora Core 3 with prefix=/usr Run festival-synthesis-driver by hand in a terminal window. Run test-speech in another terminal window. Select the Festival synthesis driver Select 'm' for gender Enter 'all' for locale The synthesis driver will seg fault.
Created attachment 46889 [details] [review] festivalsynthesisdriver.c:get_voice_list_with_spec appears to suffer from strcmp syntax issues What appears to be happening here is that the if statement in get_voice_list_with_spec want to succeed if the strings are identical. The problem is that the strcmp syntax seems to have bitten the author of this code, causing the code to do the opposite of what one might expect (I think). This patch merely places a "!" in front of the strcmps, causing the if to succeed if the strings match. There is still an underlying problem here, however, which seems to have existed in prior versions of the driver as well. festival_createSpeaker is going to call this method, and it may end up with a NULL info that it will pass to festivalspeaker.c:festival_speaker_new. festival_speaker_new assumes it's getting a non-NULL value, and looks to info->name. I think we need to decide what to do here.
Will, why wasn't there a new gnome-speech release after this bugfix was committed?
Patched code looks weird anyway, in that the return value of the expression is 'TRUE' if either strlen (info->name) or strlen(info->language) are 0. Should we be allowing nameless, language-less voices here?
I agree that info should never be NULL. Possibly it's OK to make it mostly empty, i.e. no locale and no name.