[PATCH] Typo in xserver Xvasprintf()

Colin Harrison colin.harrison at virgin.net
Thu Dec 9 16:08:24 PST 2010


Hi,

I needed this patch in the wrapper around vsnprintf() in os/xprintf.c (MinGW
for Windows build) to correct various crashes.

--- ./os/save_xprintf.c 2010-12-09 00:01:19.000000000 +0000
+++ ./os/xprintf.c      2010-12-09 23:47:34.000000000 +0000
@@ -108,7 +108,7 @@
         return -1;

     vsnprintf(*ret, size + 1, format, va);
-    ret[size] = 0;
+    (*ret)[size] = 0;
     return size;
 #endif
 }

Thanks,
Colin Harrison
 



More information about the xorg-devel mailing list