Bug 15274 - [PATCH] rarian segfault in rrn_info_find_from_uri
Summary: [PATCH] rarian segfault in rrn_info_find_from_uri
Status: RESOLVED FIXED
Alias: None
Product: Rarian
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Don Scorgie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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:


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

Description Saleem Abdulrasool 2008-03-30 13:05:41 UTC
Created attachment 15575 [details] [review]
rarian-info-segfault.patch

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
	


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.