From e8f20f1990d3a36dba970ce9082917aa87e23da1 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 18 Nov 2015 06:26:04 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/pull/56 --- MagickCore/cache.c | 2 +- MagickCore/random.c | 2 ++ MagickCore/resource.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/MagickCore/cache.c b/MagickCore/cache.c index a632e315b..bad103310 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -702,7 +702,7 @@ static MagickBooleanType ClonePixelCacheRepository( if (status == MagickFalse) continue; - if (y >= (ssize_t) clone_info->rows) + if (y == (ssize_t) clone_info->rows) continue; region.width=cache_info->columns; region.height=1; diff --git a/MagickCore/random.c b/MagickCore/random.c index a6ebcd3c8..7ccbc8e34 100644 --- a/MagickCore/random.c +++ b/MagickCore/random.c @@ -464,7 +464,9 @@ static StringInfo *GenerateEntropicChaos(RandomInfo *random_info) file=mkstemp(path); if (file != -1) { +#if defined(MAGICKCORE_HAVE_FCHMOD) (void) fchmod(file,0600); +#endif #if defined(__OS2__) setmode(file,O_BINARY); #endif diff --git a/MagickCore/resource.c b/MagickCore/resource.c index 7e250510b..6d5f57613 100644 --- a/MagickCore/resource.c +++ b/MagickCore/resource.c @@ -527,7 +527,9 @@ MagickExport int AcquireUniqueFileResource(char *path) file=mkstemp(path); if (file != -1) { +#if defined(MAGICKCORE_HAVE_FCHMOD) (void) fchmod(file,0600); +#endif #if defined(__OS2__) setmode(file,O_BINARY); #endif -- 2.40.0