GNOME Bugzilla – Bug 501559
Some search's cause yelp to crash
Last modified: 2008-01-10 20:47:27 UTC
When yelp is run initially, rarian initializes it self generation a linked list of reg for all of the help files. One of the structure elements of the reg structure is the "comment", for some help files this end's up being NULL, which i think is the correct bahaviour from a rarian perspective. However in yelp-search-parser.c:slow_search_process(), when a search is attempted and this reg structure is passed, yelp attempts to use this comment field as the default_snippet for the search. This can cause yelp to core in yelp-search-parser.c:search_parse_result(), as default_snippet can be referenced and you end up referencing a NULL pointer.
Created attachment 100184 [details] [review] Patch Attached patch checks for reg->comment being NULL for setting up the default_snippet.
Created attachment 100185 [details] [review] Patch v2 Slightly updated for l10n
Thanks. Patch has been committed to SVN trunk: 2008-01-10 Don Scorgie <dscorgie@svn.gnome.org> * src/yelp-search-parser.c: Fix potential crash when comment is NULL (bug #501559 - Matt Keenan) Marking as Fixed.