From: Cristy Date: Tue, 29 Sep 2015 12:11:16 +0000 (-0400) Subject: Disable fflush() of read-only handle under Microsoft Windows X-Git-Tag: 7.0.1-0~589 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=389502db17ba79a1a256d69ee23bbbec80b6e471;p=imagemagick Disable fflush() of read-only handle under Microsoft Windows --- diff --git a/MagickCore/blob.c b/MagickCore/blob.c index c4ec92b9e..cb6a7aa83 100755 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -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)