summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2004-12-13 01:08:30 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2004-12-13 01:08:30 +0000
commita4159b1ee324167ea41a93cd20522faf32772084 (patch)
treed1a15d7fd020224cd135ddcc611b3022afe2665e
parentb93b066619dc39e25cb53d74a49845b5b5f1be7a (diff)
downloadxorg-lib-libdmx-XORG-6_8-branch.tar.gz
//bugs.freedesktop.org/show_bug.cgi?id=1989) attachment #1442XORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8-branch
(https://bugs.freedesktop.org/attachment.cgi?id=1442): Fix invalid write in libXdmx extension library (for |DMXAddInput()|). Patch by Mark McLoughlin <mark@skynet.ie>.
-rw-r--r--src/dmx.c2
1 files changed, 1 insertions, 1 deletions
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);
}