Bug 17774 - [patch] Fix improper memory access in XSyncListSystemCounters
Summary: [patch] Fix improper memory access in XSyncListSystemCounters
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xext (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Keywords: patch
Depends on:
Reported: 2008-09-25 13:55 UTC by Kim Woelders
Modified: 2008-10-21 12:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

patch (670 bytes, patch)
2008-09-25 13:55 UTC, Kim Woelders
no flags Details | Splinter Review

Description Kim Woelders 2008-09-25 13:55:48 UTC
Created attachment 19207 [details] [review]

Valgrind reports invalid reads like

==29335== Invalid read of size 4
==29335==    at 0xAC0E49: XSyncListSystemCounters (in /usr/lib/libXext.so.6.4.0)
==29335==  Address 0x404d888 is 48 bytes inside a block of size 49 alloc'd
==29335==    at 0x4006AEE: malloc (vg_replace_malloc.c:207)
==29335==    by 0xAC0DD3: XSyncListSystemCounters (in /usr/lib/libXext.so.6.4.0)

This probably isn't a problem on any real world system, but I think it would be
nice to shut up valgrind anyway.
Attached patch should fix that.
Comment 1 Kim Woelders 2008-10-21 12:36:40 UTC
This patch (more or less) was committed as f467d17ae5a89aa1a2b8c7260334f41e8ee2d08c.

Might as well close the 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.