After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 501559 - Some search's cause yelp to crash
Some search's cause yelp to crash
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: Search
unspecified
Other opensolaris
: Normal major
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-04 16:13 UTC by Matt Keenan (IRC:MattMan)
Modified: 2008-01-10 20:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Patch (620 bytes, patch)
2007-12-04 16:16 UTC, Matt Keenan (IRC:MattMan)
none Details | Review
Patch v2 (623 bytes, patch)
2007-12-04 16:17 UTC, Matt Keenan (IRC:MattMan)
committed Details | Review

Description Matt Keenan (IRC:MattMan) 2007-12-04 16:13:06 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.
Comment 1 Matt Keenan (IRC:MattMan) 2007-12-04 16:16:33 UTC
Created attachment 100184 [details] [review]
Patch

Attached patch checks for reg->comment being NULL for setting up the
default_snippet.
Comment 2 Matt Keenan (IRC:MattMan) 2007-12-04 16:17:34 UTC
Created attachment 100185 [details] [review]
Patch v2

Slightly updated for l10n
Comment 3 Don Scorgie 2008-01-10 20:47:27 UTC
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.