]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 18 Apr 2014 01:48:55 +0000 (01:48 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 18 Apr 2014 01:48:55 +0000 (01:48 +0000)
MagickCore/log.c
coders/pes.c

index 0be742b109ed9a01c89d0cf4ae214b87d3e15719..0790fbc3645945599dd515b2884b2b32753587de 100644 (file)
@@ -750,6 +750,8 @@ MagickExport MagickBooleanType ListLogInfo(FILE *file,ExceptionInfo *exception)
               (void) FormatLocaleFile(file,"%s ",LogHandlers[j].name);
               length+=strlen(LogHandlers[j].name);
             }
+          if (LogHandlers[j].name == (const char * NULL))
+            break;
         }
         for (j=(ssize_t) length; j <= 12; j++)
           (void) FormatLocaleFile(file," ");
index 33f3ce6799b3bc6b61f57c1309e89f65f5242f52..20d2338864bd6e8ed634d11822bab167334e93c1 100644 (file)
@@ -505,7 +505,7 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception)
   for (i=0; i < (ssize_t) number_colors; i++)
   {
     j=(int) ReadBlobByte(image);
-    blocks[i].color=PESColor+j;
+    blocks[i].color=PESColor+(j < 0 ? 0 : j);
     blocks[i].offset=0;
   }
   for ( ; i < 256L; i++)