Bug 17774

Summary: [patch] Fix improper memory access in XSyncListSystemCounters
Product: xorg Reporter: Kim Woelders <kim>
Component: Lib/XextAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium Keywords: patch
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
patch none

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

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.