summaryrefslogtreecommitdiff
path: root/src/bin/embryo
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 18:57:07 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:40:46 +0900
commit1f5aa3050b5c47bac14325863bda66e1d81f2f75 (patch)
treeb4d3656897d05004f3cfee6b29365b57f18431d8 /src/bin/embryo
parentea3d28d0c3fa7dbf286f955b3e0edbb7f01e0d7c (diff)
embryo_cc - fix possible buffer overrun
fix CID 1039588
Diffstat (limited to 'src/bin/embryo')
-rw-r--r--src/bin/embryo/embryo_cc_sc2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/embryo/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c
index 7f76febd79..18a2a752bd 100644
--- a/src/bin/embryo/embryo_cc_sc2.c
+++ b/src/bin/embryo/embryo_cc_sc2.c
@@ -2693,7 +2693,8 @@ addsym(char *name, cell addr, int ident, int vclass, int tag, int usage)
2693 *refer = NULL; 2693 *refer = NULL;
2694 2694
2695 /* first fill in the entry */ 2695 /* first fill in the entry */
2696 strcpy(entry.name, name); 2696 strncpy(entry.name, name, sizeof(entry.name) - 1);
2697 entry.name[sizeof(entry.name) - 1] = 0;
2697 entry.hash = namehash(name); 2698 entry.hash = namehash(name);
2698 entry.addr = addr; 2699 entry.addr = addr;
2699 entry.vclass = (char)vclass; 2700 entry.vclass = (char)vclass;