summaryrefslogtreecommitdiff
path: root/src/bin/embryo
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:12:21 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:40:46 +0900
commitf440626cf0c3aded95670af35174895c731bcf7c (patch)
treea506eb027be67268f9efcd913e940972cf7f36cb /src/bin/embryo
parent435a0dda37d4da59a6373ac1d06949dcc3428fbc (diff)
embryo_cc - fix possible buffer overrun
fix CID 1039592
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 aee5abb36a..2b9fc8cc86 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -2481,7 +2481,8 @@ declargs(symbol * sym)
2481 case tSYMBOL: 2481 case tSYMBOL:
2482 if (argcnt >= sMAXARGS) 2482 if (argcnt >= sMAXARGS)
2483 error(45); /* too many function arguments */ 2483 error(45); /* too many function arguments */
2484 strcpy(name, ptr); /* save symbol name */ 2484 strncpy(name, ptr, sizeof(name) - 1); /* save symbol name */
2485 name[sizeof(name) - 1] = 0;
2485 if (name[0] == PUBLIC_CHAR) 2486 if (name[0] == PUBLIC_CHAR)
2486 error(56, name); /* function arguments cannot be public */ 2487 error(56, name); /* function arguments cannot be public */
2487 if (numtags == 0) 2488 if (numtags == 0)