]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 5 Oct 2010 23:41:44 +0000 (23:41 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 5 Oct 2010 23:41:44 +0000 (23:41 +0000)
ChangeLog
coders/psd.c

index 4f0e885e075d6514d05b1ced2844e63908633a67..782ae3691e1d6e25cf3539c4fd8155b76e440249 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
 2010-10-05  6.6.4-10 Cristy  <quetzlzacatenango@image...>
   * Add support for "pattern:vertical2" and "pattern:horizontal2".
   * Add support for "pattern:vertical3" and "pattern:horizontal3".
+  * Properly handle PSD layers with negative heights.
 
 2010-10-03  6.6.4-9 Cristy  <quetzlzacatenango@image...>
   * Fix memory assertion with --enable-embeddable (reference
index 5731582c45b93dec96982cc9df84b40bfe14b2dd..f91cafbc70d95598519ddb3c129279036471a26a 100644 (file)
@@ -1000,9 +1000,9 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 "  reading layer #%.20g",(double) i+1);
             layer_info[i].page.y=(int) ReadBlobMSBLong(image);
             layer_info[i].page.x=(int) ReadBlobMSBLong(image);
-            layer_info[i].page.height=(size_t)
+            layer_info[i].page.height=(ssize_t)
               (ReadBlobMSBLong(image)-layer_info[i].page.y);
-            layer_info[i].page.width=(size_t)
+            layer_info[i].page.width=(ssize_t)
               (ReadBlobMSBLong(image)-layer_info[i].page.x);
             layer_info[i].channels=ReadBlobMSBShort(image);
             if (layer_info[i].channels > MaxPSDChannels)
@@ -1166,7 +1166,8 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
               Allocate layered image.
             */
             layer_info[i].image=CloneImage(image,layer_info[i].page.width,
-              layer_info[i].page.height,MagickFalse,&image->exception);
+              layer_info[i].page.height == ~0U ? 1 : layer_info[i].page.height,
+              MagickFalse,&image->exception);
             if (layer_info[i].image == (Image *) NULL)
               {
                 for (j=0; j < i; j++)