summaryrefslogtreecommitdiff
path: root/src/gant
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2015-05-31 18:09:27 +0200
committerRALOVICH, Kristof <tade60@freemail.hu>2015-05-31 18:09:27 +0200
commitf29a83fcc06c4f782c563235aee4bb525f7d914c (patch)
tree4c0c2874ab919f58bd2e03b4e822a078353020f4 /src/gant
parent5517fc0e554c77aeab28deb5f24ebf88a86a44d4 (diff)
gant: replace strcpy with strncpy
Diffstat (limited to 'src/gant')
-rw-r--r--src/gant/gant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gant/gant.c b/src/gant/gant.c
index 1c4cca6..5586f99 100644
--- a/src/gant/gant.c
+++ b/src/gant/gant.c
@@ -1182,7 +1182,7 @@ uchar chevent(uchar chan, uchar event)
bzero(pair.devname, sizeof pair.devname);
/* if (peerdev <= 9999999) // only allow 7 digits */
/* sprintf(pair.devname, "%u", peerdev); */
- strcpy(pair.devname, fname);
+ strncpy(pair.devname, fname, sizeof(pair.devname)-1);
/* else */
/* DEBUG_OUT(1, "Pair dev name too large %08x \"%d\"\n", peerdev, peerdev) */
pair.u1 = strlen(pair.devname);