Bug 69929

Summary: XauFileName randomly crashes with segmentation fault
Product: xorg Reporter: Fuminobu TAKEYAMA <ftake>
Component: Lib/XauAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
A patch to reset bsize when malloc failed. none

Description Fuminobu TAKEYAMA 2013-09-29 13:42:40 UTC
Created attachment 86800 [details]
A patch to reset bsize when malloc failed.

I received this bug report in openSUSE project. According to the stack trace, XauFileName seems to have passed NULL to snprintf and caused segmentation fault.

https://bugzilla.novell.com/show_bug.cgi?id=831620

A possible cause is that "bsize = 0;" is missing after "malloc()" failed. I attached a patch to fix this.
Comment 1 Alan Coopersmith 2013-09-29 16:33:23 UTC
Thanks for the patch, pushed to git master:
http://cgit.freedesktop.org/xorg/lib/libXau/commit/?id=67beb3d0bc41c3416902c858f595b35306f76704

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.