Bug 102011

Summary: Valgrind error in XStoreColors
Product: xorg Reporter: Ryan C. Gordon <icculus>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: finn.bcd
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch to fix Valgrind bug none

Description Ryan C. Gordon 2017-08-02 06:55:16 UTC
Created attachment 133189 [details]
Patch to fix Valgrind bug

xColorItem contains a "pad" field that is not initialized by XStoreColor and XStoreColors, so when this struct is written to the Display's send buffer, Valgrind gets upset.

This probably _isn't_ a massive information leak sent to a remote server, so it's largely harmless, but Valgrind is correct to mark it as a bug. The more serious concern (for me, at least), is that every SDL-based program that creates a window on an X server triggers this, and those bug reports keep coming to me, so here's a patch to fix it in libx11.  :)

--ryan.
Comment 1 Alan Coopersmith 2017-08-06 23:28:35 UTC
Thanks - patch pushed to git master for the next release:

https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=4fe66b1c5112b07bd09e28bbc021911d08a9621f
Comment 2 Alan Coopersmith 2017-08-07 14:31:29 UTC
*** Bug 101076 has been marked as a duplicate of this bug. ***

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.