Bug 5279 - Crash when calling libhal_free_string_array() on return value of libhal_drive_find_all_volumes()
Summary: Crash when calling libhal_free_string_array() on return value of libhal_drive...
Status: RESOLVED FIXED
Alias: None
Product: hal
Classification: Unclassified
Component: libhal (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Danny Kukawka
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-08 11:00 UTC by Chris Spiegel
Modified: 2006-01-09 07:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fixes the problem described (694 bytes, patch)
2005-12-08 11:01 UTC, Chris Spiegel
Details | Splinter Review

Description Chris Spiegel 2005-12-08 11:00:19 UTC
libhal_drive_find_all_volumes() returns what is effectively an array of    
strings which, presumably, should later be freed with    
libhal_free_string_array().  The problem is that libhal_free_string_array()   
requires a NULL terminated list and libhal_drive_find_all_volumes() does not   
do the required termination.  I'm going to attach a patch if I can figure  
bugzilla out.
Comment 1 Chris Spiegel 2005-12-08 11:01:35 UTC
Created attachment 4039 [details] [review]
Fixes the problem described
Comment 2 Danny Kukawka 2005-12-11 06:45:14 UTC
Thanks for the report and the patch. The correct patch would be only the second 
part of your patch, because we remove alwas one entry in the array, so we need 
only to set the last element to NULL. 

I commit this to the CVS in the next days.
Comment 3 Danny Kukawka 2006-01-10 02:16:02 UTC
fixed in CVS


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.