]> granicus.if.org Git - imagemagick/commitdiff
Disable fflush() of read-only handle under Microsoft Windows
authorCristy <urban-warrior@imagemagick.org>
Tue, 29 Sep 2015 12:11:16 +0000 (08:11 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 29 Sep 2015 12:11:16 +0000 (08:11 -0400)
MagickCore/blob.c

index c4ec92b9e4c2c9e9b12ede3624750d038a2652f2..cb6a7aa833b6c74b4657785121ef6265dd3ba53b 100755 (executable)
@@ -2577,6 +2577,9 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info,
             (void) ResetMagickMemory(magick,0,sizeof(magick));
             count=fread(magick,1,sizeof(magick),image->blob->file_info.file);
             (void) fseek(image->blob->file_info.file,-((off_t) count),SEEK_CUR);
+#if defined(MAGICKCORE_POSIX_SUPPORT)
+            (void) fflush(image->blob->file_info.file);
+#endif
             (void) LogMagickEvent(BlobEvent,GetMagickModule(),
                "  read %.20g magic header bytes",(double) count);
 #if defined(MAGICKCORE_ZLIB_DELEGATE)