raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a427fc46f77e54550ec34e490100a2736dee7ec1
commit a427fc46f77e54550ec34e490100a2736dee7ec1 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Wed Aug 27 17:41:12 2014 +0900 edje_decc - fix strrchr null return case fix CID 1039342 --- src/bin/edje/edje_decc.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/bin/edje/edje_decc.c b/src/bin/edje/edje_decc.c index 9f87771..f923f4f 100644 --- a/src/bin/edje/edje_decc.c +++ b/src/bin/edje/edje_decc.c @@ -328,7 +328,7 @@ output(void) INF("Output Image: %s", out); pp = strdup(out); p = strrchr(pp, '/'); - *p = 0; + if (p) *p = 0; if (strstr(pp, "../")) { ERR("Potential security violation. attempt to write in parent dir."); @@ -359,7 +359,7 @@ output(void) INF("Output Source File: %s", out); pp = strdup(out); p = strrchr(pp, '/'); - *p = 0; + if (p) *p = 0; if (strstr(pp, "../")) { ERR("Potential security violation. attempt to write in parent dir."); @@ -410,7 +410,7 @@ output(void) INF("Output Font: %s", out); pp = strdup(out); p = strrchr(pp, '/'); - *p = 0; + if (p) *p = 0; if (strstr(pp, "../")) { ERR("Potential security violation. attempt to write in parent dir."); @@ -501,7 +501,7 @@ output(void) snprintf(out1, sizeof(out1), "%s/%s", outdir, sample->snd_src); pp = strdup(out1); p = strrchr(pp, '/'); - *p = 0; + if (p) *p = 0; if (strstr(pp, "../")) { ERR("Potential security violation. attempt to write in parent dir."); @@ -548,12 +548,7 @@ output(void) snprintf(out1, sizeof(out1), "%s/%s", outdir, sample->src); pp = strdup(out1); p = strrchr(pp, '/'); - if (!p) - { - ERR("Cannot find '/' in file"); - exit(-1); - } - *p = 0; + if (p) *p = 0; if (strstr(pp, "../")) { ERR("Potential security violation. attempt to write in parent dir."); --
