summaryrefslogtreecommitdiff
path: root/hw/dmx/config/scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'hw/dmx/config/scanner.l')
-rw-r--r--hw/dmx/config/scanner.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/dmx/config/scanner.l b/hw/dmx/config/scanner.l
index f5bb73b41..e527d6df5 100644
--- a/hw/dmx/config/scanner.l
+++ b/hw/dmx/config/scanner.l
@@ -153,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);