pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/ImageMagick graphics/ImageMagick: fix undefin...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0859261992c7
branches:  trunk
changeset: 375669:0859261992c7
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Feb 18 23:45:07 2018 +0000

description:
graphics/ImageMagick: fix undefined behavior when calling isdigit

diffstat:

 graphics/ImageMagick/Makefile                            |   4 ++--
 graphics/ImageMagick/distinfo                            |   4 +++-
 graphics/ImageMagick/patches/patch-MagickCore_delegate.c |  15 +++++++++++++++
 graphics/ImageMagick/patches/patch-MagickCore_property.c |  15 +++++++++++++++
 4 files changed, 35 insertions(+), 3 deletions(-)

diffs (63 lines):

diff -r 6998d12e8eba -r 0859261992c7 graphics/ImageMagick/Makefile
--- a/graphics/ImageMagick/Makefile     Sun Feb 18 23:18:56 2018 +0000
+++ b/graphics/ImageMagick/Makefile     Sun Feb 18 23:45:07 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.236 2018/01/28 20:10:36 wiz Exp $
+# $NetBSD: Makefile,v 1.237 2018/02/18 23:45:07 rillig Exp $
 
-PKGREVISION= 1
+PKGREVISION=   2
 .include "Makefile.common"
 
 PKGNAME=       ImageMagick-${DISTVERSION}
diff -r 6998d12e8eba -r 0859261992c7 graphics/ImageMagick/distinfo
--- a/graphics/ImageMagick/distinfo     Sun Feb 18 23:18:56 2018 +0000
+++ b/graphics/ImageMagick/distinfo     Sun Feb 18 23:45:07 2018 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.177 2018/01/28 15:14:40 wiz Exp $
+$NetBSD: distinfo,v 1.178 2018/02/18 23:45:07 rillig Exp $
 
 SHA1 (ImageMagick-7.0.7-22.tar.xz) = 5965e9ba6d8c69ff702d1ed3e60bdb218ad2851e
 RMD160 (ImageMagick-7.0.7-22.tar.xz) = d2a95bd7059cbfc0b4453e1cd083722b41109be0
 SHA512 (ImageMagick-7.0.7-22.tar.xz) = 3a5bcceb8469c743738d71db670ea60e30fdb4c1bacc5719832828d97d52c256366ce3a4d80aace1466109ac42b9bb6ca8b5c53f939c043eac2d1c816961d772
 Size (ImageMagick-7.0.7-22.tar.xz) = 8605016 bytes
+SHA1 (patch-MagickCore_delegate.c) = 5123e00dc1fd9ec2ddd31194ee491d1e00f2c074
+SHA1 (patch-MagickCore_property.c) = 7ff826e91d5f2737cb4efd15e3de4dcd37d5561e
diff -r 6998d12e8eba -r 0859261992c7 graphics/ImageMagick/patches/patch-MagickCore_delegate.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/ImageMagick/patches/patch-MagickCore_delegate.c  Sun Feb 18 23:45:07 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-MagickCore_delegate.c,v 1.1 2018/02/18 23:45:07 rillig Exp $
+
+See https://github.com/ImageMagick/ImageMagick/pull/988
+
+--- MagickCore/delegate.c.orig 2018-01-06 14:18:42.000000000 +0000
++++ MagickCore/delegate.c
+@@ -931,7 +931,7 @@ RestoreMSCWarning
+   extent=MagickPathExtent;  /* allocated space in string */
+   number=MagickFalse;  /* is last char a number? */
+   for (q=interpret_text; *p!='\0';
+-    number=isdigit(*p) ? MagickTrue : MagickFalse,p++)
++    number=isdigit((int) ((unsigned char) *p)) ? MagickTrue : MagickFalse,p++)
+   {
+     /*
+       Interpret escape characters (e.g. Filename: %M).
diff -r 6998d12e8eba -r 0859261992c7 graphics/ImageMagick/patches/patch-MagickCore_property.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/ImageMagick/patches/patch-MagickCore_property.c  Sun Feb 18 23:45:07 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-MagickCore_property.c,v 1.1 2018/02/18 23:45:07 rillig Exp $
+
+See https://github.com/ImageMagick/ImageMagick/pull/989
+
+--- MagickCore/property.c.orig 2018-01-06 14:18:42.000000000 +0000
++++ MagickCore/property.c
+@@ -3375,7 +3375,7 @@ RestoreMSCWarning
+   interpret_text=AcquireString(embed_text); /* new string with extra space */
+   extent=MagickPathExtent;                     /* allocated space in string */
+   number=MagickFalse;                       /* is last char a number? */
+-  for (q=interpret_text; *p!='\0'; number=isdigit(*p) ? MagickTrue : MagickFalse,p++)
++  for (q=interpret_text; *p!='\0'; number=isdigit((int) ((unsigned char) *p)) ? MagickTrue : MagickFalse,p++)
+   {
+     /*
+       Look for the various escapes, (and handle other specials)



Home | Main Index | Thread Index | Old Index