Bug 102011 - Valgrind error in XStoreColors
Summary: Valgrind error in XStoreColors
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 101076 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-02 06:55 UTC by Ryan C. Gordon
Modified: 2017-08-07 14:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix Valgrind bug (1.10 KB, text/plain)
2017-08-02 06:55 UTC, Ryan C. Gordon
no flags Details

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.