Bug 17774 - [patch] Fix improper memory access in XSyncListSystemCounters
[patch] Fix improper memory access in XSyncListSystemCounters
Product: xorg
Classification: Unclassified
Component: Lib/Xext
All All
: medium normal
Assigned To: Xorg Project Team
Xorg Project Team
: patch
Depends on:
  Show dependency treegraph
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

Note You need to log in before you can comment on or make changes to this bug.
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 :)