Bug 69929 - XauFileName randomly crashes with segmentation fault
Summary: XauFileName randomly crashes with segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xau (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-29 13:42 UTC by Fuminobu TAKEYAMA
Modified: 2013-09-29 16:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
A patch to reset bsize when malloc failed. (394 bytes, text/plain)
2013-09-29 13:42 UTC, Fuminobu TAKEYAMA
no flags Details

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.