This commit is contained in:
Kim Woelders 2014-12-20 10:28:09 +01:00
parent 54594ccd8d
commit 3a121573f3
1 changed files with 10 additions and 10 deletions

View File

@ -237,8 +237,8 @@ load(ImlibImage * im, ImlibProgressFunction progress,
{
}
if ((size_t)ss.st_size < sizeof(tga_header) + header->idLength +
(footer_present ? sizeof(tga_footer) : 0))
if ((size_t) ss.st_size < sizeof(tga_header) + header->idLength +
(footer_present ? sizeof(tga_footer) : 0))
{
munmap(seg, ss.st_size);
close(fd);
@ -360,9 +360,9 @@ load(ImlibImage * im, ImlibProgressFunction progress,
{
if (bufptr + bpp / 8 > bufend)
{
munmap(seg, ss.st_size);
close(fd);
return 0;
munmap(seg, ss.st_size);
close(fd);
return 0;
}
switch (bpp)
{
@ -418,11 +418,11 @@ load(ImlibImage * im, ImlibProgressFunction progress,
int count;
if ((bufptr + 1 + (bpp / 8)) > bufend)
{
munmap(seg, ss.st_size);
close(fd);
return 0;
}
{
munmap(seg, ss.st_size);
close(fd);
return 0;
}
curbyte = *bufptr++;
count = (curbyte & 0x7F) + 1;