]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 21:09:22 +0000 (21:09 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 21:09:22 +0000 (21:09 +0000)
MagickCore/blob.c

index 91d04cb51922334c026d11bfd9982ca18a28887f..cbcae1bd5063ffeb1e453b86999f59a78472d9ef 100644 (file)
@@ -3602,6 +3602,8 @@ MagickExport MagickOffsetType SeekBlob(Image *image,
       return(-1);
     case FileStream:
     {
+      if ((whence == SEEK_SET) && (offset < 0))
+        return(-1);
       if (fseek(image->blob->file_info.file,offset,whence) < 0)
         return(-1);
       image->blob->offset=TellBlob(image);