Skip to content

Commit

Permalink
Moved EOF check.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Dec 29, 2014
1 parent d1d4a62 commit 21eae25
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions coders/dds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2369,16 +2369,16 @@ static MagickBooleanType SkipDXTMipmaps(Image *image,DDSInfo *dds_info,
/*
Only skip mipmaps for textures and cube maps
*/
if (EOFBlob(image) != MagickFalse)
{
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);
return(MagickFalse);
}
if (dds_info->ddscaps1 & DDSCAPS_MIPMAP
&& (dds_info->ddscaps1 & DDSCAPS_TEXTURE
|| dds_info->ddscaps2 & DDSCAPS2_CUBEMAP))
{
if (EOFBlob(image) != MagickFalse)
{
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);
return(MagickFalse);
}
w = DIV2(dds_info->width);
h = DIV2(dds_info->height);

Expand Down Expand Up @@ -2416,16 +2416,16 @@ static MagickBooleanType SkipRGBMipmaps(Image *image,DDSInfo *dds_info,
/*
Only skip mipmaps for textures and cube maps
*/
if (EOFBlob(image) != MagickFalse)
{
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);
return(MagickFalse);
}
if (dds_info->ddscaps1 & DDSCAPS_MIPMAP
&& (dds_info->ddscaps1 & DDSCAPS_TEXTURE
|| dds_info->ddscaps2 & DDSCAPS2_CUBEMAP))
{
if (EOFBlob(image) != MagickFalse)
{
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);
return(MagickFalse);
}
w = DIV2(dds_info->width);
h = DIV2(dds_info->height);

Expand Down

0 comments on commit 21eae25

Please sign in to comment.