Bug 15274 - [PATCH] rarian segfault in rrn_info_find_from_uri
[PATCH] rarian segfault in rrn_info_find_from_uri
Product: Rarian
Classification: Unclassified
Component: General
Other All
: medium normal
Assigned To: Don Scorgie
Depends on:
  Show dependency treegraph
Reported: 2008-03-30 13:05 UTC by Saleem Abdulrasool
Modified: 2008-07-29 11:24 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

rarian-info-segfault.patch (326 bytes, patch)
2008-03-30 13:05 UTC, Saleem Abdulrasool
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Saleem Abdulrasool 2008-03-30 13:05:41 UTC
Created attachment 15575 [details] [review]

If during an invocation of rrn_info_find_from_uri, there is no hit in the search of the info pages, best_result stays NULL.  After the search, the returned value is best_result->reg.  Because best_result is NULL at this point, rarian will segfault.

Attached patch verifies that there is a hit and then returns the result, otherwise returns NULL as documented.
Comment 1 Claude Paroz 2008-05-02 08:41:07 UTC
Confirmed the bug, and the patch!
Comment 2 Don Scorgie 2008-07-29 11:24:38 UTC
Thanks for the patch.  Been committed and will appear in 0.8.1:

2008-07-29  Don Scorgie  <Don@Scorgie.org>
	* librarian/rarian-info.c:
	Only return best result when it exists
	Bug #15274 - Saleem Abdulrasool