forked from enlightenment/efl
embryo - embryo_cc - argv parsing MIGHT leave str buf not nul terminated
should fix CID 1039726
This commit is contained in:
parent
6a75806e54
commit
6991785df9
|
@ -592,7 +592,8 @@ parseoptions(int argc, char **argv, char *iname, char *oname,
|
||||||
{
|
{
|
||||||
/* include directory */
|
/* include directory */
|
||||||
i++;
|
i++;
|
||||||
strncpy(str, argv[i], sizeof(str));
|
strncpy(str, argv[i], sizeof(str) - 1);
|
||||||
|
str[sizeof(str) - 1] = '\0';
|
||||||
|
|
||||||
len = strlen(str);
|
len = strlen(str);
|
||||||
if (str[len - 1] != DIRSEP_CHAR)
|
if (str[len - 1] != DIRSEP_CHAR)
|
||||||
|
|
Loading…
Reference in New Issue