hi,

the following fixes a buffer overflow in SendHelperMessage() which i
started seeing recently on x64.


diff -r 5a2507602c48 src/misc.c
--- a/src/misc.c        Sun Dec 14 19:59:05 2008 -0800
+++ b/src/misc.c        Wed Dec 24 13:26:51 2008 +0100
@@ -1103,7 +1103,7 @@
 
     len = (msg ? strlen(msg) : 0) + (workspace >=0 ? 4 : 0) + 1 ;
     buffer = wmalloc(len+5);
-    snprintf(buf, len, "%4i", len);
+    snprintf(buf, sizeof(buf), "%4i", len);
     memcpy(buffer, buf, 4);
     buffer[4] = type;
     i = 5;


-- 
[-]

mkdir /nonexistent


-- 
To unsubscribe, send mail to [email protected].

Reply via email to