diff options
author | Kevin E Martin <kem@kem.org> | 2004-12-06 20:04:04 +0000 |
---|---|---|
committer | Kevin E Martin <kem@kem.org> | 2004-12-06 20:04:04 +0000 |
commit | 9569816261fed00b3f0991abb676d60ba904c0f6 (patch) | |
tree | d1a15d7fd020224cd135ddcc611b3022afe2665e /src | |
parent | 90b1782cf132d4d3a753e4643fe8c398cecbb07b (diff) |
Fix overwrite in DMX library calls (Bug #1989, Mark McLoughlin).sco_port_update-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1
Diffstat (limited to 'src')
-rw-r--r-- | src/dmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -424,7 +424,7 @@ Bool DMXAddScreen(Display *dpy, const char *displayName, unsigned int mask, if (length) { char *buffer = Xmalloc(paddedLength); memset(buffer, 0, paddedLength); - strcpy(buffer, displayName); + memcpy(buffer, displayName, length); Data32(dpy, buffer, paddedLength); Xfree(buffer); } @@ -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); } |