From 010877c93487337f452c7b584fadec9506932b9d Mon Sep 17 00:00:00 2001 From: cedric Date: Mon, 26 Dec 2011 15:23:30 +0000 Subject: [PATCH] evas: check the availability of the generic loader before execing it. Patch requested by Guillaume Friloux. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@66532 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/loaders/generic/evas_image_load_generic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/loaders/generic/evas_image_load_generic.c b/src/modules/loaders/generic/evas_image_load_generic.c index 6e07fd8..4025367 100644 --- a/src/modules/loaders/generic/evas_image_load_generic.c +++ b/src/modules/loaders/generic/evas_image_load_generic.c @@ -126,6 +126,7 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool img_loader = alloca(cmd_len + 1); strcpy(img_loader, libdir); strcat(img_loader, loader); + // params excluding file, key and loadopts cmd_len += 1024; cmd_len += strlen(file) * 2; @@ -189,6 +190,8 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool // will interpret shell stuff and path hunt that will then exec the // program itself that will dynamically link that will again // parse the arguments and finally do something... + if (access(decoders[try_count], X_OK)) continue; + strcpy(cmd, decoders[try_count]); strcat(cmd, " "); // filename first arg -- 2.7.4