diff options
author | Cedric BAIL <cedric.bail@samsung.com> | 2014-01-24 08:17:53 +0900 |
---|---|---|
committer | Cedric BAIL <cedric.bail@samsung.com> | 2014-01-24 08:20:52 +0900 |
commit | 8a850aad44b73869a3744d82347c1fcf61f7a8fa (patch) | |
tree | 8884e3de1012fc01dc50596bef33ea5fcdd84171 | |
parent | 868597f42de272f13297458f5e327717488ea191 (diff) | |
download | efl-8a850aad44b73869a3744d82347c1fcf61f7a8fa.tar.gz |
embryo: force the insertion of a '/' in the path to be sure that file path make sense.
-rw-r--r-- | src/bin/embryo/embryo_cc_sc2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bin/embryo/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c index 90e177c16a..0b72ee312a 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 */ |