summaryrefslogtreecommitdiff
path: root/src/bin/embryo
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:13:44 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:40:47 +0900
commitd78703d0a87b3cd1b678c3f4c54dc0f3bb2eb066 (patch)
tree8a5c6f5f2c8526573e4fad63dce2a7c039c90bab /src/bin/embryo
parentf440626cf0c3aded95670af35174895c731bcf7c (diff)
embryo_cc - fix possible buffer overrun
fix CID 1039593
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 2b9fc8cc86..ff998e77b3 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -1610,7 +1610,8 @@ decl_enum(int vclass)
1610 * tag was set) */ 1610 * tag was set) */
1611 if (lex(&lexval, &str) == tSYMBOL) 1611 if (lex(&lexval, &str) == tSYMBOL)
1612 { /* read in (new) token */ 1612 { /* read in (new) token */
1613 strcpy(enumname, str); /* save enum name (last constant) */ 1613 strncpy(enumname, str, sizeof(enumname) - 1); /* save enum name (last constant) */
1614 enumname[sizeof(enumname) - 1] = 0;
1614 if (!explicittag) 1615 if (!explicittag)
1615 tag = sc_addtag(enumname); 1616 tag = sc_addtag(enumname);
1616 } 1617 }