summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-11 22:50:34 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-11 22:50:34 +0900
commit6991785df9e36d9b59ad04247a89113703a1ab02 (patch)
treea726be4ff6a59a0c2bacdde7f39da950de103891 /src
parent6a75806e54e6f5da85ad69753f72574bea03b61e (diff)
embryo - embryo_cc - argv parsing MIGHT leave str buf not nul terminated
should fix CID 1039726
Diffstat (limited to 'src')
-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 37e71d4f7..391cf98b9 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -592,7 +592,8 @@ parseoptions(int argc, char **argv, char *iname, char *oname,
{
/* include directory */
i++;
- strncpy(str, argv[i], sizeof(str));
+ strncpy(str, argv[i], sizeof(str) - 1);
+ str[sizeof(str) - 1] = '\0';
len = strlen(str);
if (str[len - 1] != DIRSEP_CHAR)