loader_tga.c: Properly signal if decoding uncompressed BGRA data failed

Required to reject id:000134,src:000105,op:havoc,rep:32.
This commit is contained in:
Fabian Keil 2014-12-04 13:53:04 +01:00 committed by Carsten Haitzler (Rasterman)
parent edaf7b669c
commit 2fdef015ff
1 changed files with 7 additions and 1 deletions

View File

@ -356,8 +356,14 @@ load(ImlibImage * im, ImlibProgressFunction progress,
else
dataptr = im->data + (y * im->w);
for (x = 0; (x < im->w) && (bufptr + bpp / 8 <= bufend); x++) /* for each pixel in the row */
for (x = 0; (x < im->w); x++) /* for each pixel in the row */
{
if (bufptr + bpp / 8 > bufend)
{
munmap(seg, ss.st_size);
close(fd);
return 0;
}
switch (bpp)
{