[ImageMagick/f20] Forgotten 4 patches
Pavel Alexeev
hubbitus at fedoraproject.org
Tue Mar 10 23:11:58 UTC 2015
commit 070181a3f3594b7090fdfe577188b839848797f1
Author: Hubbitus <pahan at hubbitus.info>
Date: Wed Mar 11 02:11:51 2015 +0300
Forgotten 4 patches
ImageMagick-6.8.6-hdr-bz#1195263.patch | 69 ++++++++++++++++++++++++++++++++
ImageMagick-6.8.6-miff-bz#1195265.patch | 54 +++++++++++++++++++++++++
ImageMagick-6.8.6-pdb-bz#1195269.patch | 19 +++++++++
ImageMagick-6.8.6-vicar-bz#1195271.patch | 11 +++++
4 files changed, 153 insertions(+)
---
diff --git a/ImageMagick-6.8.6-hdr-bz#1195263.patch b/ImageMagick-6.8.6-hdr-bz#1195263.patch
new file mode 100644
index 0000000..e0f069b
--- /dev/null
+++ b/ImageMagick-6.8.6-hdr-bz#1195263.patch
@@ -0,0 +1,69 @@
+Index: ImageMagick/branches/ImageMagick-6/ChangeLog
+===================================================================
+--- a/ImageMagick/branches/ImageMagick-6/ChangeLog
++++ b/ImageMagick/branches/ImageMagick-6/ChangeLog
+@@ -1,6 +1,8 @@
+ 2013-07-01 6.8.6-3 Cristy <quetzlzacatenango at image...>
+ * New version 6.8.6-3, SVN revision 12579.
+
++ * Fixed infinite loop in HDR reader (reference
++ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26929).
+ 2013-06-26 6.8.6-3 Cristy <quetzlzacatenango at image...>
+ * Improve HCL to RGB roundtrip (reference
+ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=22384).
+
+Index: ImageMagick/branches/ImageMagick-6/coders/hdr.c
+===================================================================
+--- a/ImageMagick/branches/ImageMagick-6/coders/hdr.c
++++ b/ImageMagick/branches/ImageMagick-6/coders/hdr.c
+@@ -275,5 +275,5 @@
+ continue;
+ p=value;
+- while ((c != '\n') && (c != '\0'))
++ while ((c != '\n') && (c != '\0') && (c != EOF))
+ {
+ if ((size_t) (p-value) < (MaxTextExtent-1))
+@@ -320,16 +320,18 @@
+ white_point[2];
+
+- (void) sscanf(value,"%g %g %g %g %g %g %g %g",
+- &chromaticity[0],&chromaticity[1],&chromaticity[2],
+- &chromaticity[3],&chromaticity[4],&chromaticity[5],
+- &white_point[0],&white_point[1]);
+- image->chromaticity.red_primary.x=chromaticity[0];
+- image->chromaticity.red_primary.y=chromaticity[1];
+- image->chromaticity.green_primary.x=chromaticity[2];
+- image->chromaticity.green_primary.y=chromaticity[3];
+- image->chromaticity.blue_primary.x=chromaticity[4];
+- image->chromaticity.blue_primary.y=chromaticity[5];
+- image->chromaticity.white_point.x=white_point[0],
+- image->chromaticity.white_point.y=white_point[1];
++ if (sscanf(value,"%g %g %g %g %g %g %g %g",&chromaticity[0],
++ &chromaticity[1],&chromaticity[2],&chromaticity[3],
++ &chromaticity[4],&chromaticity[5],&white_point[0],
++ &white_point[1]) == 8)
++ {
++ image->chromaticity.red_primary.x=chromaticity[0];
++ image->chromaticity.red_primary.y=chromaticity[1];
++ image->chromaticity.green_primary.x=chromaticity[2];
++ image->chromaticity.green_primary.y=chromaticity[3];
++ image->chromaticity.blue_primary.x=chromaticity[4];
++ image->chromaticity.blue_primary.y=chromaticity[5];
++ image->chromaticity.white_point.x=white_point[0],
++ image->chromaticity.white_point.y=white_point[1];
++ }
+ break;
+ }
+@@ -350,7 +352,9 @@
+ width;
+
+- (void) sscanf(value,"%d +X %d",&height,&width);
+- image->columns=(size_t) width;
+- image->rows=(size_t) height;
++ if (sscanf(value,"%d +X %d",&height,&width) == 2)
++ {
++ image->columns=(size_t) width;
++ image->rows=(size_t) height;
++ }
+ break;
+ }
diff --git a/ImageMagick-6.8.6-miff-bz#1195265.patch b/ImageMagick-6.8.6-miff-bz#1195265.patch
new file mode 100644
index 0000000..5a49eec
--- /dev/null
+++ b/ImageMagick-6.8.6-miff-bz#1195265.patch
@@ -0,0 +1,54 @@
+diff -ur ImageMagick-6.8.6-3.miff-orig/coders/miff.c ImageMagick-6.8.6-3/coders/miff.c
+--- ImageMagick-6.8.6-3.miff-orig/coders/miff.c 2013-05-17 22:58:19.000000000 +0400
++++ ImageMagick-6.8.6-3/coders/miff.c 2015-03-10 22:37:49.930865595 +0300
+@@ -1399,6 +1399,9 @@
+ bzip_info.avail_out=(unsigned int) (packet_size*image->columns);
+ do
+ {
++ int
++ code;
++
+ if (bzip_info.avail_in == 0)
+ {
+ bzip_info.next_in=(char *) compress_pixels;
+@@ -1408,7 +1411,13 @@
+ bzip_info.avail_in=(unsigned int) ReadBlob(image,length,
+ (unsigned char *) bzip_info.next_in);
+ }
+- if (BZ2_bzDecompress(&bzip_info) == BZ_STREAM_END)
++ code=BZ2_bzDecompress(&bzip_info);
++ if (code < 0)
++ {
++ status=MagickFalse;
++ break;
++ }
++ if (code == BZ_STREAM_END)
+ break;
+ } while (bzip_info.avail_out != 0);
+ (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+@@ -1455,6 +1464,9 @@
+ zip_info.avail_out=(uInt) (packet_size*image->columns);
+ do
+ {
++ int
++ code;
++
+ if (zip_info.avail_in == 0)
+ {
+ zip_info.next_in=compress_pixels;
+@@ -1464,7 +1476,13 @@
+ zip_info.avail_in=(unsigned int) ReadBlob(image,length,
+ zip_info.next_in);
+ }
+- if (inflate(&zip_info,Z_SYNC_FLUSH) == Z_STREAM_END)
++ code=inflate(&zip_info,Z_SYNC_FLUSH);
++ if (code < 0)
++ {
++ status=MagickFalse;
++ break;
++ }
++ if (code == Z_STREAM_END)
+ break;
+ } while (zip_info.avail_out != 0);
+ (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+Только в ImageMagick-6.8.6-3/coders: miff.c.orig
diff --git a/ImageMagick-6.8.6-pdb-bz#1195269.patch b/ImageMagick-6.8.6-pdb-bz#1195269.patch
new file mode 100644
index 0000000..54d4ad0
--- /dev/null
+++ b/ImageMagick-6.8.6-pdb-bz#1195269.patch
@@ -0,0 +1,19 @@
+Index: ImageMagick/branches/ImageMagick-6/coders/pdb.c
+===================================================================
+--- a/ImageMagick/branches/ImageMagick-6/coders/pdb.c
++++ b/ImageMagick/branches/ImageMagick-6/coders/pdb.c
+@@ -372,5 +372,13 @@
+ }
+ num_pad_bytes = (size_t) (img_offset - TellBlob( image ));
+- while (num_pad_bytes--) ReadBlobByte( image );
++ while (num_pad_bytes-- != 0)
++ {
++ int
++ c;
++
++ c=ReadBlobByte(image);
++ if (c == EOF)
++ break;
++ }
+ /*
+ Read image header.
diff --git a/ImageMagick-6.8.6-vicar-bz#1195271.patch b/ImageMagick-6.8.6-vicar-bz#1195271.patch
new file mode 100644
index 0000000..7e6aa75
--- /dev/null
+++ b/ImageMagick-6.8.6-vicar-bz#1195271.patch
@@ -0,0 +1,11 @@
+Index: ImageMagick/branches/ImageMagick-6/coders/vicar.c
+===================================================================
+--- a/ImageMagick/branches/ImageMagick-6/coders/vicar.c
++++ b/ImageMagick/branches/ImageMagick-6/coders/vicar.c
+@@ -276,4 +276,6 @@
+ {
+ c=ReadBlobByte(image);
++ if (c == EOF)
++ break;
+ count++;
+ }
More information about the scm-commits
mailing list