]> granicus.if.org Git - imagemagick/commitdiff
Fixed recursive lock and added assert to detect this in the future.
authordirk <dirk@git.imagemagick.org>
Thu, 6 Nov 2014 21:55:10 +0000 (21:55 +0000)
committerdirk <dirk@git.imagemagick.org>
Thu, 6 Nov 2014 21:55:10 +0000 (21:55 +0000)
MagickCore/exception.c
coders/png.c

index bcc656b9934ad9a7a97ae1719cc5fd2835ec3822..debc7368e022f75944409a92bf1ab55158af2f89 100644 (file)
@@ -623,6 +623,7 @@ MagickExport void InheritException(ExceptionInfo *exception,
   assert(exception->signature == MagickSignature);
   assert(relative != (ExceptionInfo *) NULL);
   assert(relative->signature == MagickSignature);
+  assert(exception != relative);
   if (relative->exceptions == (void *) NULL)
     return;
   LockSemaphoreInfo(relative->semaphore);
index 9bb71bebe7b615493ae5e36aca0692eae5d7fb44..0ca0088175d1cf7750334fd6d2c3d338122ff9cb 100644 (file)
@@ -2196,10 +2196,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
           "  exit ReadOnePNGImage() with error.");
 
       if (image != (Image *) NULL)
-        {
-          InheritException(exception,exception);
-          image->columns=0;
-        }
+        image->columns=0;
 
       return(GetFirstImageInList(image));
     }