cedric pushed a commit to branch efl-1.8. http://git.enlightenment.org/core/efl.git/commit/?id=8a850aad44b73869a3744d82347c1fcf61f7a8fa
commit 8a850aad44b73869a3744d82347c1fcf61f7a8fa Author: Cedric BAIL <[email protected]> Date: Fri Jan 24 08:17:53 2014 +0900 embryo: force the insertion of a '/' in the path to be sure that file path make sense. --- src/bin/embryo/embryo_cc_sc2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/embryo/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c index 90e177c..0b72ee3 100644 --- a/src/bin/embryo/embryo_cc_sc2.c +++ b/src/bin/embryo/embryo_cc_sc2.c @@ -146,10 +146,8 @@ plungefile(char *name, int try_currentpath, int try_includepaths) { char path[PATH_MAX]; - strncpy(path, ptr, sizeof path); + snprintf(path, sizeof (path), "%s/%s", ptr, name); path[sizeof path - 1] = '\0'; /* force '\0' termination */ - strncat(path, name, sizeof(path) - strlen(path) - 1); - path[sizeof path - 1] = '\0'; result = plungequalifiedfile(path); } /* while */ } /* if */ --
