more bmp fixes

SVN revision: 11411
This commit is contained in:
Carsten Haitzler 2004-08-28 03:34:05 +00:00
parent ea6dad9c78
commit 36a66790e5
1 changed files with 11 additions and 0 deletions

View File

@ -111,6 +111,11 @@ load(ImlibImage * im, ImlibProgressFunction progress,
fseek(f, 8, SEEK_CUR);
ReadleLong(f, &offset);
ReadleLong(f, &headSize);
if (offset >= size)
{
fclose(f);
return 0;
}
if (headSize == 12)
{
ReadleShort(f, &tmpShort);
@ -139,6 +144,12 @@ load(ImlibImage * im, ImlibProgressFunction progress,
fclose(f);
return 0;
}
if ((w > 8192) || (h > 8192))
{
fclose(f);
return 0;
}
if (bitcount < 16)
{