]> granicus.if.org Git - imagemagick/commitdiff
fix multiple null pointer
authorroot <356986351@qq.com>
Thu, 28 Sep 2017 17:40:50 +0000 (17:40 +0000)
committerDirk Lemstra <dlemstra@users.noreply.github.com>
Thu, 28 Sep 2017 19:11:13 +0000 (21:11 +0200)
coders/art.c
coders/bgr.c
coders/cmyk.c
coders/dpx.c
coders/pgx.c
coders/ycbcr.c

index 55f3515f4cd21832383cb0a58b3a58b3fcb9f982..3abde9678459300975c7068b0cd4bf189b511fc6 100644 (file)
@@ -325,7 +325,7 @@ static MagickBooleanType WriteARTImage(const ImageInfo *image_info,Image *image,
   (void) WriteBlobLSBShort(image,0);
   (void) WriteBlobLSBShort(image,(unsigned short) image->rows);
   quantum_info=AcquireQuantumInfo(image_info,image);
-  if(quantum_info == (QuantumInfo *) NULL)
+  if (quantum_info == (QuantumInfo *) NULL)
     ThrowWriterException(ImageError,"MemoryAllocationFailed");
   pixels=(unsigned char *) GetQuantumPixels(quantum_info);
   for (y=0; y < (ssize_t) image->rows; y++)
index 2d6da144765741de4221b51bd486b6a986a87d61..1998b4187ff746f7c2c96b610ec8f6f744a7178b 100644 (file)
@@ -159,7 +159,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info,
   */
   canvas_image=CloneImage(image,image->extract_info.width,1,MagickFalse,
     exception);
-  if(canvas_image == (Image *) NULL)
+  if (canvas_image == (Image *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   (void) SetImageVirtualPixelMethod(canvas_image,BlackVirtualPixelMethod,
     exception);
index 2b52f04bbc70081912c69397a1e31dd7f882619d..cbe9501465bc976c49ac3b3e937f07230210eeda 100644 (file)
@@ -162,7 +162,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info,
   */
   canvas_image=CloneImage(image,image->extract_info.width,1,MagickFalse,
     exception);
-  if(canvas_image == (Image *) NULL)
+  if (canvas_image == (Image *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   (void) SetImageVirtualPixelMethod(canvas_image,BlackVirtualPixelMethod,
     exception);
index b78c6f60c4ebdbf9afd2b851d0f4c57cc376907c..9c1001b28176c4cfaee6960ea88962b811ef0b0e 100644 (file)
@@ -1969,7 +1969,7 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image,
     Convert pixel packets to DPX raster image.
   */
   quantum_info=AcquireQuantumInfo(image_info,image);
-  if(quantum_info == (QuantumInfo *) NULL)
+  if (quantum_info == (QuantumInfo *) NULL)
     ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
   SetQuantumQuantum(quantum_info,32);
   SetQuantumPack(quantum_info,dpx.image.image_element[0].packing == 0 ?
index 7381848167bca80685929ffb53b603e21cfed036..4b616f68bec4bf45ede2df357f72801ae995adaa 100644 (file)
@@ -366,7 +366,7 @@ static MagickBooleanType WritePGXImage(const ImageInfo *image_info,Image *image,
   (void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
   (void) TransformImageColorspace(image,sRGBColorspace,exception);
   quantum_info=AcquireQuantumInfo(image_info,image);
-  if(quantum_info == (QuantumInfo *) NULL)
+  if (quantum_info == (QuantumInfo *) NULL)
     ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
   pixels=(unsigned char *) GetQuantumPixels(quantum_info);
   for (y=0; y < (ssize_t) image->rows; y++)
index 066ef46d907c7965604e111008558c27021e3f4b..1ecaa3b4cf79f33c90911b11e589463b96fc8c7f 100644 (file)
@@ -169,7 +169,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info,
   */
   canvas_image=CloneImage(image,image->extract_info.width,1,MagickFalse,
     exception);
-  if(canvas_image == (Image *) NULL)
+  if (canvas_image == (Image *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
   (void) SetImageVirtualPixelMethod(canvas_image,BlackVirtualPixelMethod,
     exception);