Skip to content
Permalink
Browse files

Moved EOF check.

  • Loading branch information...
dlemstra committed Dec 29, 2014
1 parent d1d4a62 commit 21eae25a8db5fdcd112dbcfcd9e5c37e32d32e2f
Showing with 12 additions and 12 deletions.
  1. +12 −12 coders/dds.c
@@ -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);

@@ -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);

0 comments on commit 21eae25

Please sign in to comment.
You can’t perform that action at this time.