WindowMaker/WindowMaker-crash.patch

12 lines
297 B
Diff

--- src/misc.c
+++ src/misc.c
@@ -1141,7 +1141,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;