fix for apply_format()
fix possible NULL pointer in '%c' callout substitution and cleanup '%D' debug text
thanks,
Kay
namedev.c +6 -3
@@ -200,11 +200,12 @@case 'D' :if (strlen (udev->kernel_number) ==0 ) {strcat (pos,"disc" ); +dbg ("substitute devfs disc" );break ; }strcat (pos,"part" );strcat (pos, udev->kernel_number); -dbg ("substitute kernel number '%s'" , udev->kernel_number); +dbg ("substitute devfs part '%s'" , udev->kernel_number);break ;case 'm' :sprintf (pos,"%u" , udev->minor);
@@ -229,8 +230,10 @@break ; } } -strcat (pos, pos3); -dbg ("substitute partial callout output '%s'" , pos3); +if (pos3) { +strcat (pos, pos3); +dbg ("substitute partial callout output '%s'" , pos3); + } }else {strcat (pos, udev->callout_value);dbg ("substitute callout output '%s'" , udev->callout_value);
Greg KH
AppliedQuoted 3 lines · Kay Sievers
fix possible NULL pointer in '%c' callout substitution and cleanup '%D' debug text
Applied, thanks.
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel