summaryrefslogtreecommitdiff
path: root/src/bin/embryo
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:03:16 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:40:46 +0900
commit09648f6cf1a8db5640a8e25e1be8c6a6c69c4f7a (patch)
treed89c62855edbb9d20feb40a8168997e711004e39 /src/bin/embryo
parent1f5aa3050b5c47bac14325863bda66e1d81f2f75 (diff)
embryo_cc - fix possible buffer overrun
fix CID 1039589
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 6432b5599d..b97e199950 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -3030,7 +3030,8 @@ insert_constval(constvalue * prev, constvalue * next, char *name,
3030 if (!(cur = (constvalue *)malloc(sizeof(constvalue)))) 3030 if (!(cur = (constvalue *)malloc(sizeof(constvalue))))
3031 error(103); /* insufficient memory (fatal error) */ 3031 error(103); /* insufficient memory (fatal error) */
3032 memset(cur, 0, sizeof(constvalue)); 3032 memset(cur, 0, sizeof(constvalue));
3033 strcpy(cur->name, name); 3033 strncpy(cur->name, name, sizeof(cur->name) - 1);
3034 cur->name[sizeof(cur->name) - 1] = 0;
3034 cur->value = val; 3035 cur->value = val;
3035 cur->index = idx; 3036 cur->index = idx;
3036 cur->next = next; 3037 cur->next = next;