summaryrefslogtreecommitdiff
path: root/src/bin/embryo
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:15:46 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:40:47 +0900
commit0b7e3cf42256c22f2feb0be1915f0b2947fb73f6 (patch)
tree8540ca135789ce154b0eec8bf244c38bca244c35 /src/bin/embryo
parentd78703d0a87b3cd1b678c3f4c54dc0f3bb2eb066 (diff)
embryo_cc - fix possible buffer overrun
fix CID 1039594
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 ff998e77b3..0cf39e44bd 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -1560,7 +1560,8 @@ decl_const(int vclass)
1560 if (lex(&val, &str) != tSYMBOL) /* read in (new) token */ 1560 if (lex(&val, &str) != tSYMBOL) /* read in (new) token */
1561 error(20, str); /* invalid symbol name */ 1561 error(20, str); /* invalid symbol name */
1562 symbolline = fline; /* save line where symbol was found */ 1562 symbolline = fline; /* save line where symbol was found */
1563 strcpy(constname, str); /* save symbol name */ 1563 strncpy(constname, str, sizeof(constname) - 1); /* save symbol name */
1564 constname[sizeof(constname) - 1] = 0;
1564 needtoken('='); 1565 needtoken('=');
1565 constexpr(&val, &exprtag); /* get value */ 1566 constexpr(&val, &exprtag); /* get value */
1566 needtoken(tTERM); 1567 needtoken(tTERM);