summaryrefslogtreecommitdiff
path: root/src/bin/embryo
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:10:48 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:40:46 +0900
commit435a0dda37d4da59a6373ac1d06949dcc3428fbc (patch)
tree5d7c8651d64c9ac8d4e71a4494d5edf6245362de /src/bin/embryo
parent88fda07299e3569be8b9b64c4c6e95652d845679 (diff)
embryo_cc - fix possible buffer overrun
fix CID 1039591
Diffstat (limited to 'src/bin/embryo')
-rw-r--r--src/bin/embryo/embryo_cc_sc1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/embryo/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c
index 15049f9834..aee5abb36a 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -2637,7 +2637,8 @@ doarg(char *name, int ident, int offset, int tags[], int numtags,
2637 cell size; 2637 cell size;
2638 int idxtag[sDIMEN_MAX]; 2638 int idxtag[sDIMEN_MAX];
2639 2639
2640 strcpy(arg->name, name); 2640 strncpy(arg->name, name, sizeof(arg->name) - 1);
2641 arg->name[sizeof(arg->name) - 1] = 0;
2641 arg->hasdefault = FALSE; /* preset (most common case) */ 2642 arg->hasdefault = FALSE; /* preset (most common case) */
2642 arg->defvalue.val = 0; /* clear */ 2643 arg->defvalue.val = 0; /* clear */
2643 arg->defvalue_tag = 0; 2644 arg->defvalue_tag = 0;