TGA loader: Fix for corrupt RLE format.

Patch by Matias Garcia/Ross Video.

SVN revision: 76919
This commit is contained in:
Kim Woelders 2012-09-20 18:04:06 +00:00
parent 12a35d6bae
commit a115ba3645
1 changed files with 2 additions and 1 deletions

View File

@ -457,7 +457,8 @@ load(ImlibImage * im, ImlibProgressFunction progress,
{
int i;
for (i = 0; (i < count) && (dataptr < final_pixel); i++)
for (i = 0; (i < count) && (dataptr < final_pixel) &&
((bufptr + (bpp / 8)) <= bufend); i++)
{
switch (bpp)
{