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 37e71d4f76..391cf98b97 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,
592 { 592 {
593 /* include directory */ 593 /* include directory */
594 i++; 594 i++;
595 strncpy(str, argv[i], sizeof(str)); 595 strncpy(str, argv[i], sizeof(str) - 1);
596 str[sizeof(str) - 1] = '\0';
596 597
597 len = strlen(str); 598 len = strlen(str);
598 if (str[len - 1] != DIRSEP_CHAR) 599 if (str[len - 1] != DIRSEP_CHAR)