forked from old/legacy-imlib2
__imlib_LoadImage(): Additionally check loader_ret to detect loader failures
Fixes: ==14822== Conditional jump or move depends on uninitialised value(s) ==14822== at 0x4E08376: load (loader_tiff.c:285) ==14822== by 0x1F7D70F: __imlib_LoadImage (image.c:1041) ==14822== by 0x1F090E4: imlib_load_image_with_error_return (api.c:1299) ==14822== by 0x40F47B: feh_load_image (imlib.c:252) ==14822== by 0x42CA0E: winwidget_loadimage (winwidget.c:753) ==14822== by 0x42C918: winwidget_create_from_file (winwidget.c:126) ==14822== by 0x421869: init_slideshow_mode (slideshow.c:62) ==14822== by 0x418F13: main (main.c:78) ==14822== ==14822== Conditional jump or move depends on uninitialised value(s) ==14822== at 0x4E083BC: load (loader_tiff.c:285) ==14822== by 0x1F7D70F: __imlib_LoadImage (image.c:1041) ==14822== by 0x1F090E4: imlib_load_image_with_error_return (api.c:1299) ==14822== by 0x40F47B: feh_load_image (imlib.c:252) ==14822== by 0x42CA0E: winwidget_loadimage (winwidget.c:753) ==14822== by 0x42C918: winwidget_create_from_file (winwidget.c:126) ==14822== by 0x421869: init_slideshow_mode (slideshow.c:62) ==14822== by 0x418F13: main (main.c:78) ==14822== when scaling id:000407,src:000226,op:havoc,rep:32 in feh.
This commit is contained in:
parent
b0a42f8763
commit
a104e317ce
|
@ -1048,7 +1048,7 @@ __imlib_LoadImage(const char *file, ImlibProgressFunction progress,
|
||||||
im->loader = best_loader;
|
im->loader = best_loader;
|
||||||
/* all loaders have been tried and they all failed. free the skeleton */
|
/* all loaders have been tried and they all failed. free the skeleton */
|
||||||
/* image struct we had and return NULL */
|
/* image struct we had and return NULL */
|
||||||
if (im->w == 0)
|
if ((loader_ret == 0) || (im->w == 0))
|
||||||
{
|
{
|
||||||
/* if the caller wants an error return */
|
/* if the caller wants an error return */
|
||||||
if (er)
|
if (er)
|
||||||
|
|
Loading…
Reference in New Issue