Bug 15274

Summary: [PATCH] rarian segfault in rrn_info_find_from_uri
Product: Rarian Reporter: Saleem Abdulrasool <compnerd>
Component: GeneralAssignee: Don Scorgie <Don>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: claude, petrosyan
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: rarian-info-segfault.patch

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.