aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/config/scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/dmx/config/scanner.l')
-rw-r--r--xorg-server/hw/dmx/config/scanner.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/hw/dmx/config/scanner.l b/xorg-server/hw/dmx/config/scanner.l
index cef99d088..e527d6df5 100644
--- a/xorg-server/hw/dmx/config/scanner.l
+++ b/xorg-server/hw/dmx/config/scanner.l
@@ -39,6 +39,7 @@
#include "dmxparse.h"
#include "parser.h"
+#include "os.h"
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
@@ -152,7 +153,7 @@ static int getdimension(int token, const char *text, int leng)
char *tmp = dmxConfigAlloc(leng+1);
int x, y;
- strncpy(tmp, text, leng);
+ strlcpy(tmp, text, leng+1);
x = strtol(tmp, &endptr, 10);
while (*endptr && !isdigit(*endptr)) ++endptr;
y = strtol(endptr, NULL, 10);