aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/config/dmxcompat.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/dmx/config/dmxcompat.c')
-rw-r--r--xorg-server/hw/dmx/config/dmxcompat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/hw/dmx/config/dmxcompat.c b/xorg-server/hw/dmx/config/dmxcompat.c
index b4190ffcc..1c72084fa 100644
--- a/xorg-server/hw/dmx/config/dmxcompat.c
+++ b/xorg-server/hw/dmx/config/dmxcompat.c
@@ -42,6 +42,7 @@
#include <dmx-config.h>
#endif
+#include "os.h"
#include "dmxconfig.h"
#include "dmxparse.h"
#include "dmxcompat.h"
@@ -94,8 +95,7 @@ static void dmxVDLDisplayEntry(const char *buf,
char *end;
pt = strchr(buf, ' ');
- strncpy(name, buf, pt-buf);
- name[pt-buf] = '\0';
+ strlcpy(name, buf, 1+pt-buf);
*len = strlen(name);
*x = strtol(pt, &end, 10);