From a4159b1ee324167ea41a93cd20522faf32772084 Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Mon, 13 Dec 2004 01:08:30 +0000 Subject: //bugs.freedesktop.org/show_bug.cgi?id=1989) attachment #1442 (https://bugs.freedesktop.org/attachment.cgi?id=1442): Fix invalid write in libXdmx extension library (for |DMXAddInput()|). Patch by Mark McLoughlin . --- src/dmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmx.c b/src/dmx.c index f7ecece..33aa87b 100644 --- a/src/dmx.c +++ b/src/dmx.c @@ -730,7 +730,7 @@ Bool DMXAddInput(Display *dpy, unsigned int mask, DMXInputAttributes *attr, if (length) { char *buffer = Xmalloc(paddedLength); memset(buffer, 0, paddedLength); - strcpy(buffer, attr->name); + memcpy(buffer, attr->name, paddedLength); Data32(dpy, buffer, paddedLength); Xfree(buffer); } -- cgit v1.2.3