GNOME Bugzilla – Bug 119748
entering '*' into score subject box will cause crash when group is accessed
Last modified: 2006-06-18 05:04:46 UTC
Selected Articles->Plonk Author Changed subject to * Selected [Add & Rescore]. Pan crashes Restart Pan. Select same ng as selected above. Pan Crashes Edit score file from '*' to '.*' Restart Pan. Select same ng as selected above. Pan Works as expected.
(can't be Pan 0.10.0; that one didn't have scoring) Looks like you _can_ enter an illegal regular expression to crash Pan. Maybe there's a validator we can use before calling regexec()?
+ Trace 39562
Yes, regcomp() returns an error state if the expression is bad. We need to test for that, preferably both in the backend and in the score creation dialog.
Two other notes: 1. In order to tickle this bug, I had to change the Subject: option menu from "contains" to "matches regular expression". 2. There's no need to set ".*" in the Subject: match for plonking an author; just turn off the Subject: criteria instead. :)
Fixed in CVS: http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan/filters&command=DIFF_FRAMESET&file=score.c&rev1=1.20&rev2=1.21&root=/cvs/gnome http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan/filters&command=DIFF_FRAMESET&file=filter-phrase.h&rev1=1.14&rev2=1.15&root=/cvs/gnome http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan/filters&command=DIFF_FRAMESET&file=filter-phrase.c&rev1=1.26&rev2=1.27&root=/cvs/gnome http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan&command=DIFF_FRAMESET&file=score-add-ui.c&rev1=1.6&rev2=1.7&root=/cvs/gnome