[PATCH xserver 2/2] XF86VidMode: Fix free() on walked pointer

Hans de Goede hdegoede at redhat.com
Fri Sep 23 11:50:49 UTC 2016


Based on: https://patchwork.freedesktop.org/patch/85636/

Rewritten to just not walk the pointer.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 Xext/vidmode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Xext/vidmode.c b/Xext/vidmode.c
index 499a2a8..ea3ad13 100644
--- a/Xext/vidmode.c
+++ b/Xext/vidmode.c
@@ -1364,7 +1364,7 @@ ProcVidModeGetDotClocks(ClientPtr client)
     WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), &rep);
     if (!ClockProg) {
         for (n = 0; n < numClocks; n++) {
-            dotclock = *Clocks++;
+            dotclock = Clocks[n];
             if (client->swapped) {
                 WriteSwappedDataToClient(client, 4, (char *) &dotclock);
             }
-- 
2.9.3



More information about the xorg-devel mailing list