evas: check the availability of the generic loader before execing it.

Patch requested by Guillaume Friloux.


SVN revision: 66532
This commit is contained in:
Cedric BAIL 2011-12-26 15:23:30 +00:00
parent 1b03505ec0
commit 638e61f314
1 changed files with 3 additions and 0 deletions

View File

@ -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