]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 17:20:55 +0000 (17:20 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 18 May 2014 17:20:55 +0000 (17:20 +0000)
MagickCore/xml-tree.c
MagickCore/xwindow.c
coders/icon.c
coders/miff.c

index 8fc693a8271c85fbfdc46dece61e0fcc08fba090..2ba31dec6cc22186beaf315a242f7b8a8bd82c31 100644 (file)
@@ -1562,7 +1562,7 @@ static void ParseCharacterContent(XMLTreeRoot *root,char *xml,
     return;
   xml[length]='\0';
   xml=ParseEntities(xml,root->entities,state);
-  if (*xml_info->content != '\0')
+  if ((xml_info->content != (char *) NULL) && (*xml_info->content != '\0'))
     {
       (void) ConcatenateString(&xml_info->content,xml);
       xml=DestroyString(xml);
index 95d8ba1f3c5a635327f6eeb6a9d0387078253d12..a9ec377c48d3528eeefeb5efdf5c25f539f0aec7 100644 (file)
@@ -3142,17 +3142,16 @@ MagickPrivate void XGetPixelInfo(Display *display,
   /*
     Set highlight color.
   */
-  pixel->highlight_color.red=(unsigned short) ((
+  pixel->highlight_color.red=(unsigned short) (((double) 
     pixel->matte_color.red*ScaleQuantumToShort(HighlightModulate))/65535L+
     (ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
-  pixel->highlight_color.green=(unsigned short) ((
+  pixel->highlight_color.green=(unsigned short) (((double) 
     pixel->matte_color.green*ScaleQuantumToShort(HighlightModulate))/65535L+
     (ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
-  pixel->highlight_color.blue=(unsigned short) ((
+  pixel->highlight_color.blue=(unsigned short) (((double) 
     pixel->matte_color.blue*ScaleQuantumToShort(HighlightModulate))/65535L+
     (ScaleQuantumToShort((Quantum) (QuantumRange-HighlightModulate))));
-  pixel->highlight_color.pixel=
-    XStandardPixel(map_info,&pixel->highlight_color);
+  pixel->highlight_color.pixel=XStandardPixel(map_info,&pixel->highlight_color);
   pixel->highlight_color.flags=(char) (DoRed | DoGreen | DoBlue);
   /*
     Set shadow color.
index 7ea44afb58646fd46d93e4c1610f0191e2c3b332..6312744a722ecc599dfd8e11a15d8dce62e2af6d 100644 (file)
@@ -1334,11 +1334,11 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
       }
     if (GetNextImageInList(next) == (Image *) NULL)
       break;
-    next=SyncNextImageInList(next);
     status=SetImageProgress(next,SaveImagesTag,scene++,
       GetImageListLength(next));
     if (status == MagickFalse)
       break;
+    next=SyncNextImageInList(next);
   } while ((next != (Image *) NULL) && (image_info->adjoin != MagickFalse));
   offset=SeekBlob(image,0,SEEK_SET);
   (void) offset;
index 7b37d1eac37d970ed8e49022c3b752ebf7b7e0d5..61e43211656e291d0ed59d87387a183e79f1acc4 100644 (file)
@@ -213,8 +213,9 @@ static void PushRunlengthPacket(Image *image,const unsigned char *pixels,
       {
         case 32:
         {
-          pixel->index=ConstrainColormapIndex(image,
-            (*p << 24) | (*(p+1) << 16) | (*(p+2) << 8) | *(p+3),exception);
+          pixel->index=ConstrainColormapIndex(image,((size_t) *p << 24) |
+            ((size_t) *(p+1) << 16) | ((size_t) *(p+2) << 8) | (size_t) *(p+3),
+            exception);
           p+=4;
           break;
         }