summaryrefslogtreecommitdiff
path: root/editors/xemacs
diff options
context:
space:
mode:
authorhauke <hauke@pkgsrc.org>2015-02-04 09:19:20 +0000
committerhauke <hauke@pkgsrc.org>2015-02-04 09:19:20 +0000
commit61f7f02afd762f8e92f0c1bb8171d9e8e6e90064 (patch)
tree704aa71d4ab2237c695ff9509e7fef68d15e7d19 /editors/xemacs
parent523d3e5ecf93ccb5d96c5c5a5a390e6efff2277f (diff)
downloadpkgsrc-61f7f02afd762f8e92f0c1bb8171d9e8e6e90064.tar.gz
Update to XEmacs 21.4.23
2015-01-29 Vin Shelton <acs@xemacs.org> * XEmacs 21.4.23 is released 2015-01-08 Vin Shelton <acs@xemacs.org> Fix progress bar crashes. Thanks to Ralf Soergel for diagnosis and a patch. * configure.in (Athena widgets): Test for "international" resource in SimpleWidgetClass in libXaw3d. * configure: Rebuild.
Diffstat (limited to 'editors/xemacs')
-rw-r--r--editors/xemacs/Makefile7
-rw-r--r--editors/xemacs/distinfo35
-rw-r--r--editors/xemacs/patches/patch-Makefile.in.in (renamed from editors/xemacs/patches/patch-ac)8
-rw-r--r--editors/xemacs/patches/patch-ad7
-rw-r--r--editors/xemacs/patches/patch-al16
-rw-r--r--editors/xemacs/patches/patch-configure (renamed from editors/xemacs/patches/patch-aa)10
-rw-r--r--editors/xemacs/patches/patch-configure.in (renamed from editors/xemacs/patches/patch-af)8
-rw-r--r--editors/xemacs/patches/patch-lib-src_Makefile.in.in (renamed from editors/xemacs/patches/patch-ab)8
-rw-r--r--editors/xemacs/patches/patch-lib-src_vcdiff (renamed from editors/xemacs/patches/patch-ag)12
-rw-r--r--editors/xemacs/patches/patch-lwlib_Makefile.in.in16
-rw-r--r--editors/xemacs/patches/patch-src_Makefile.in.in (renamed from editors/xemacs/patches/patch-ak)4
-rw-r--r--editors/xemacs/patches/patch-src_config.h.in6
-rw-r--r--editors/xemacs/patches/patch-src_dired.c (renamed from editors/xemacs/patches/patch-ae)4
-rw-r--r--editors/xemacs/patches/patch-src_glyphs-eimage.c74
-rw-r--r--editors/xemacs/patches/patch-src_lisp.h6
-rw-r--r--editors/xemacs/patches/patch-src_unexelf.c (renamed from editors/xemacs/patches/patch-ah)8
-rw-r--r--editors/xemacs/patches/patch-src_unexfreebsd.c (renamed from editors/xemacs/patches/patch-ai)8
17 files changed, 100 insertions, 137 deletions
diff --git a/editors/xemacs/Makefile b/editors/xemacs/Makefile
index dcaaf361c4e..b221b4544ac 100644
--- a/editors/xemacs/Makefile
+++ b/editors/xemacs/Makefile
@@ -1,15 +1,16 @@
-# $NetBSD: Makefile,v 1.111 2015/01/01 09:53:50 dholland Exp $
+# $NetBSD: Makefile,v 1.112 2015/02/04 09:19:20 hauke Exp $
PKGNAME?= ${DISTNAME}
COMMENT?= XEmacs text editor version 21
-DISTNAME= xemacs-21.4.22
-PKGREVISION= 12
+DISTNAME= xemacs-21.4.23
+#PKGREVISION= 1
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_XEMACS:=${DISTNAME:C/[.][^.]*$//}/}
MAINTAINER= hauke@NetBSD.org
HOMEPAGE= http://www.xemacs.org/
+LICENSE= gnu-gpl-v2
CONFLICTS+= gnuserv-[0-9]*
CONFLICTS+= xemacs-[0-9]*
diff --git a/editors/xemacs/distinfo b/editors/xemacs/distinfo
index a719c1c6ac3..65a76bbbcc9 100644
--- a/editors/xemacs/distinfo
+++ b/editors/xemacs/distinfo
@@ -1,19 +1,18 @@
-$NetBSD: distinfo,v 1.18 2012/12/24 21:08:06 joerg Exp $
+$NetBSD: distinfo,v 1.19 2015/02/04 09:19:20 hauke Exp $
-SHA1 (xemacs/xemacs-21.4.22.tar.gz) = 24ed9b13d80c53c06bba60c7bb68387f692b7373
-RMD160 (xemacs/xemacs-21.4.22.tar.gz) = f7d71d3607c3301760df8f7ae5a93d1d37df56ba
-Size (xemacs/xemacs-21.4.22.tar.gz) = 8357931 bytes
-SHA1 (patch-aa) = 933c2522fce7877d73c57cf0e153afcce78bdf7e
-SHA1 (patch-ab) = 1487edf8addea7971f4fcbcf57818090f32edef5
-SHA1 (patch-ac) = effbc40595b0c3b6e443588528113d907a6056c1
-SHA1 (patch-ad) = e2a70a64f0659ffda6dd27b37512e4dc5bd4ecf4
-SHA1 (patch-ae) = c3ad7249bb7eb51c509546fc88fe3efc5b70a6d7
-SHA1 (patch-af) = 97cd3d340f349a645a7be9a683879528d9f4c5f2
-SHA1 (patch-ag) = 0ccbead4be5da92e73a15432ff1b063da13cf0b4
-SHA1 (patch-ah) = 9a02b989a6d45cdfead22ea703acceca722cf313
-SHA1 (patch-ai) = ea752473a56d20907201763966ecdeaaeffac84a
-SHA1 (patch-ak) = bfbd285a1cc7d4e93a2fc884e03492dec9302e55
-SHA1 (patch-al) = 247826009110453a868525e711e084b7dee49664
-SHA1 (patch-src_config.h.in) = 2fd4ca6966f0d2b56ba92fa31a99ebce31c2c2b7
-SHA1 (patch-src_glyphs-eimage.c) = f013013d467d32dfac63287dd5a565153855a751
-SHA1 (patch-src_lisp.h) = 7b4c7984cfbfe1e3a30aac2009f777b8d95c013c
+SHA1 (xemacs/xemacs-21.4.23.tar.gz) = b57bc569cf8d376c1e2443b6ea1f40d30271e9a6
+RMD160 (xemacs/xemacs-21.4.23.tar.gz) = 9df94c576b546a4df30c29ed3b5609ee816ad43c
+Size (xemacs/xemacs-21.4.23.tar.gz) = 8537366 bytes
+SHA1 (patch-Makefile.in.in) = ac8e41c0057a3c3aed0f02dc282423eb48158b7c
+SHA1 (patch-configure) = a48c1a92098c67d6f3e87c0c0e9917bc545d5155
+SHA1 (patch-configure.in) = 6ae72ac1746b42fc7f9a451579a5288f53a2b21c
+SHA1 (patch-lib-src_Makefile.in.in) = 865662811be6a92d5022f76e8325d0b194942791
+SHA1 (patch-lib-src_vcdiff) = bd42965219395cdae24d63972c23b3578229f375
+SHA1 (patch-lwlib_Makefile.in.in) = 2de9b7c45d7f5337d25138e518cd303b3c721fab
+SHA1 (patch-src_Makefile.in.in) = 28098f18870c34165b37fe11e84cbd6f5584bc63
+SHA1 (patch-src_config.h.in) = 9a031ace4ca6f89dacbf599484d9fcd410d7841f
+SHA1 (patch-src_dired.c) = 98f1c076c29385e3d5052cdb84d067f6cec8bc22
+SHA1 (patch-src_glyphs-eimage.c) = ea561758dd454003eb3274508087fd302d9d9fd4
+SHA1 (patch-src_lisp.h) = 92f866c17745a3bf664c3c1153249f15fffb1866
+SHA1 (patch-src_unexelf.c) = 738d09ea8a3d10b609e474b0efb8806d3e302bf9
+SHA1 (patch-src_unexfreebsd.c) = 89ce80b21fa5d6cf8be98762183c6a8b0d8f71dd
diff --git a/editors/xemacs/patches/patch-ac b/editors/xemacs/patches/patch-Makefile.in.in
index c2cc053829f..4e437b5e62e 100644
--- a/editors/xemacs/patches/patch-ac
+++ b/editors/xemacs/patches/patch-Makefile.in.in
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.5 2003/02/25 02:14:59 uebayasi Exp $
+$NetBSD: patch-Makefile.in.in,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- Makefile.in.in.orig Fri Nov 1 12:51:47 2002
+--- Makefile.in.in.orig 2015-01-29 15:04:29.000000000 +0000
+++ Makefile.in.in
-@@ -403,7 +403,7 @@
+@@ -407,7 +407,7 @@ lwlib/config.h: ${srcdir}/lwlib/config.h
## all. --cet
check-features: all
@@ -11,7 +11,7 @@ $NetBSD: patch-ac,v 1.5 2003/02/25 02:14:59 uebayasi Exp $
install-only: ${MAKE_SUBDIR} check-features install-arch-dep install-arch-indep
-@@ -489,8 +489,10 @@
+@@ -495,8 +495,10 @@ install-arch-indep: mkdir info
fi
cd ${srcdir}/etc && \
for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \
diff --git a/editors/xemacs/patches/patch-ad b/editors/xemacs/patches/patch-ad
deleted file mode 100644
index 635fdc1c780..00000000000
--- a/editors/xemacs/patches/patch-ad
+++ /dev/null
@@ -1,7 +0,0 @@
-$NetBSD: patch-ad,v 1.1 1999/06/29 23:13:40 tron Exp $
-
---- etc/ctags.1.orig Wed Dec 18 23:42:17 1996
-+++ etc/ctags.1 Sun Feb 22 23:20:23 1998
-@@ -1 +1 @@
--.so man1/etags.1
-+.so man1/xemacs-etags.1
diff --git a/editors/xemacs/patches/patch-al b/editors/xemacs/patches/patch-al
deleted file mode 100644
index 4a017b31689..00000000000
--- a/editors/xemacs/patches/patch-al
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-al,v 1.1 1999/12/06 14:24:03 bouyer Exp $
-
---- lwlib/Makefile.in.in.old Mon Dec 6 00:34:23 1999
-+++ lwlib/Makefile.in.in Mon Dec 6 00:34:40 1999
-@@ -59,9 +59,9 @@
-
- #ifdef SOLARIS2
- %.o : %.c
--#else
--.c.o:
-+ $(CC) -c $(cflags) $<
- #endif
-+.c.o:
- $(CC) -c $(cflags) $<
-
- ## Create preprocessor output (debugging purposes only)
diff --git a/editors/xemacs/patches/patch-aa b/editors/xemacs/patches/patch-configure
index aa0f1650b39..a25a1d08eb9 100644
--- a/editors/xemacs/patches/patch-aa
+++ b/editors/xemacs/patches/patch-configure
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.6 2007/02/15 14:27:48 joerg Exp $
+$NetBSD: patch-configure,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- configure.orig 2005-01-31 03:06:14.000000000 +0000
+--- configure.orig 2015-01-29 15:04:29.000000000 +0000
+++ configure
@@ -1130,6 +1130,7 @@ echo "$ac_t""$configuration" 1>&6
machine='' opsys=''
@@ -30,7 +30,7 @@ $NetBSD: patch-aa,v 1.6 2007/02/15 14:27:48 joerg Exp $
*-nextstep* ) opsys=nextstep ;;
*-pc-cygwin* ) opsys=cygwin32 ;;
*-pc-mingw* ) opsys=mingw32 ;
-@@ -3133,7 +3136,7 @@ echo "configure:3131: checking "for runt
+@@ -3132,7 +3135,7 @@ echo "configure:3130: checking "for runt
decosf* | linux* | irix*) dash_r="-rpath " ;;
*)
dash_r=""
@@ -39,7 +39,7 @@ $NetBSD: patch-aa,v 1.6 2007/02/15 14:27:48 joerg Exp $
xe_check_libs="${try_dash_r}/no/such/file-or-directory"
if test "$GCC" = "yes"; then
-@@ -14091,6 +14094,41 @@ else for feature in ncurses gpm; do
+@@ -14312,6 +14315,41 @@ else for feature in ncurses gpm; do
eval "with_${feature}=no"
done
fi
@@ -81,7 +81,7 @@ $NetBSD: patch-aa,v 1.6 2007/02/15 14:27:48 joerg Exp $
test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" && extra_objs="$extra_objs event-unixoid.o" && if test "$extra_verbose" = "yes"; then
echo " xemacs will be linked with \"event-unixoid.o\""
fi
-@@ -16511,6 +16549,7 @@ s%@libs_xauth@%$libs_xauth%g
+@@ -16917,6 +16955,7 @@ s%@libs_xauth@%$libs_xauth%g
s%@dnd_objs@%$dnd_objs%g
s%@lwlib_objs@%$lwlib_objs%g
s%@ALLOCA@%$ALLOCA%g
diff --git a/editors/xemacs/patches/patch-af b/editors/xemacs/patches/patch-configure.in
index a5a112843bd..150acfef029 100644
--- a/editors/xemacs/patches/patch-af
+++ b/editors/xemacs/patches/patch-configure.in
@@ -1,6 +1,6 @@
-$NetBSD: patch-af,v 1.6 2007/02/15 14:27:48 joerg Exp $
+$NetBSD: patch-configure.in,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- configure.in.orig 2005-01-31 02:54:47.000000000 +0000
+--- configure.in.orig 2015-01-29 15:04:29.000000000 +0000
+++ configure.in
@@ -1082,6 +1082,7 @@ machine='' opsys=''
@@ -31,7 +31,7 @@ $NetBSD: patch-af,v 1.6 2007/02/15 14:27:48 joerg Exp $
*-nextstep* ) opsys=nextstep ;;
*-pc-cygwin* ) opsys=cygwin32 ;;
*-pc-mingw* ) opsys=mingw32 ;
-@@ -2247,7 +2249,7 @@ if test "$add_runtime_path" = "yes"; the
+@@ -2245,7 +2247,7 @@ if test "$add_runtime_path" = "yes"; the
decosf* | linux* | irix*) dash_r="-rpath " ;;
*)
dash_r=""
@@ -40,7 +40,7 @@ $NetBSD: patch-af,v 1.6 2007/02/15 14:27:48 joerg Exp $
xe_check_libs="${try_dash_r}/no/such/file-or-directory"
XE_PROTECT_LINKER_FLAGS(xe_check_libs)
AC_TRY_LINK(, , dash_r="$try_dash_r")
-@@ -4409,6 +4411,9 @@ else dnl "$with_tty" = "no"
+@@ -4522,6 +4524,9 @@ else dnl "$with_tty" = "no"
done
fi dnl with_tty
diff --git a/editors/xemacs/patches/patch-ab b/editors/xemacs/patches/patch-lib-src_Makefile.in.in
index 16e0dfbae39..401ab6b1f2a 100644
--- a/editors/xemacs/patches/patch-ab
+++ b/editors/xemacs/patches/patch-lib-src_Makefile.in.in
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.4 2003/02/25 02:14:59 uebayasi Exp $
+$NetBSD: patch-lib-src_Makefile.in.in,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- lib-src/Makefile.in.in.orig Tue Aug 20 20:34:16 2002
+--- lib-src/Makefile.in.in.orig 2015-01-29 15:04:29.000000000 +0000
+++ lib-src/Makefile.in.in
-@@ -237,7 +237,7 @@
+@@ -237,7 +237,7 @@ do-blessmail: $(blessmail)
## Install the internal utilities. Until they are installed, we can
## just run them directly from lib-src.
@@ -11,7 +11,7 @@ $NetBSD: patch-ab,v 1.4 2003/02/25 02:14:59 uebayasi Exp $
@echo; echo "Installing utilities run internally by XEmacs."
./make-path ${archlibdir}
if test "`(cd ${archlibdir} && $(pwd))`" != "`$(pwd)`"; then \
-@@ -248,17 +248,23 @@
+@@ -248,17 +248,23 @@ ${archlibdir}: all
if test "`(cd ${archlibdir} && $(pwd))`" \
!= "`(cd ${srcdir} && $(pwd))`"; then \
for f in ${PRIVATE_INSTALLABLE_SCRIPTS}; do \
diff --git a/editors/xemacs/patches/patch-ag b/editors/xemacs/patches/patch-lib-src_vcdiff
index f572845adb0..0054aa90903 100644
--- a/editors/xemacs/patches/patch-ag
+++ b/editors/xemacs/patches/patch-lib-src_vcdiff
@@ -1,7 +1,7 @@
-$NetBSD: patch-ag,v 1.3 2008/04/29 14:07:15 tonnerre Exp $
+$NetBSD: patch-lib-src_vcdiff,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- lib-src/vcdiff.orig 1996-12-18 22:42:33.000000000 +0000
-+++ lib-src/vcdiff 2008-04-29 13:27:28.000000000 +0100
+--- lib-src/vcdiff.orig 2015-01-29 15:04:29.000000000 +0000
++++ lib-src/vcdiff
@@ -1,23 +1,35 @@
-#!/bin/sh
+#! /bin/sh
@@ -47,7 +47,7 @@ $NetBSD: patch-ag,v 1.3 2008/04/29 14:07:15 tonnerre Exp $
sid1= sid2=
for f
-@@ -31,14 +43,14 @@
+@@ -31,14 +43,14 @@ do
echo=:;;
-r?*)
case $sid1 in
@@ -67,7 +67,7 @@ $NetBSD: patch-ag,v 1.3 2008/04/29 14:07:15 tonnerre Exp $
;;
esac
;;
-@@ -67,31 +79,24 @@
+@@ -67,31 +79,24 @@ trap 'rm -f $rev1 $rev2 || status=2; exi
for f
do
@@ -103,7 +103,7 @@ $NetBSD: patch-ag,v 1.3 2008/04/29 14:07:15 tonnerre Exp $
$DIFF $options $rev1 $workfile
s=$?
fi
-@@ -104,3 +109,5 @@
+@@ -104,3 +109,5 @@ do
then status=$s
fi
done
diff --git a/editors/xemacs/patches/patch-lwlib_Makefile.in.in b/editors/xemacs/patches/patch-lwlib_Makefile.in.in
new file mode 100644
index 00000000000..90be6060d0c
--- /dev/null
+++ b/editors/xemacs/patches/patch-lwlib_Makefile.in.in
@@ -0,0 +1,16 @@
+$NetBSD: patch-lwlib_Makefile.in.in,v 1.1 2015/02/04 09:19:20 hauke Exp $
+
+--- lwlib/Makefile.in.in.orig 2015-01-29 15:04:29.000000000 +0000
++++ lwlib/Makefile.in.in
+@@ -59,9 +59,9 @@ cflags = $(CFLAGS) $(cppflags)
+
+ #ifdef SOLARIS2
+ %.o : %.c
+-#else
+-.c.o:
++ $(CC) -c $(cflags) $<
+ #endif
++.c.o:
+ $(CC) -c $(cflags) $<
+
+ ## Create preprocessor output (debugging purposes only)
diff --git a/editors/xemacs/patches/patch-ak b/editors/xemacs/patches/patch-src_Makefile.in.in
index bb8458cbb38..782c1c35210 100644
--- a/editors/xemacs/patches/patch-ak
+++ b/editors/xemacs/patches/patch-src_Makefile.in.in
@@ -1,6 +1,6 @@
-$NetBSD: patch-ak,v 1.5 2008/04/24 15:32:15 jlam Exp $
+$NetBSD: patch-src_Makefile.in.in,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- src/Makefile.in.in.orig 2005-01-30 21:55:02.000000000 -0500
+--- src/Makefile.in.in.orig 2015-01-29 15:04:29.000000000 +0000
+++ src/Makefile.in.in
@@ -72,8 +72,8 @@ CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
diff --git a/editors/xemacs/patches/patch-src_config.h.in b/editors/xemacs/patches/patch-src_config.h.in
index 9409328c709..2aa3891e8c3 100644
--- a/editors/xemacs/patches/patch-src_config.h.in
+++ b/editors/xemacs/patches/patch-src_config.h.in
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_config.h.in,v 1.1 2012/12/24 21:08:06 joerg Exp $
+$NetBSD: patch-src_config.h.in,v 1.2 2015/02/04 09:19:20 hauke Exp $
---- src/config.h.in.orig 2005-11-28 02:10:19.000000000 +0000
+--- src/config.h.in.orig 2015-01-29 15:04:29.000000000 +0000
+++ src/config.h.in
-@@ -852,7 +852,7 @@ on various systems. */
+@@ -853,7 +853,7 @@ on various systems. */
/* Does the keyword `inline' exist? */
#undef inline
diff --git a/editors/xemacs/patches/patch-ae b/editors/xemacs/patches/patch-src_dired.c
index 9f492e9cf00..2b7cea567b1 100644
--- a/editors/xemacs/patches/patch-ae
+++ b/editors/xemacs/patches/patch-src_dired.c
@@ -1,6 +1,6 @@
-$NetBSD: patch-ae,v 1.3 2007/02/15 14:27:48 joerg Exp $
+$NetBSD: patch-src_dired.c,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- src/dired.c.orig 2007-02-13 18:38:12.000000000 +0000
+--- src/dired.c.orig 2015-01-29 15:04:29.000000000 +0000
+++ src/dired.c
@@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */
/* Synched up with: FSF 19.30. */
diff --git a/editors/xemacs/patches/patch-src_glyphs-eimage.c b/editors/xemacs/patches/patch-src_glyphs-eimage.c
index ae70f5acaba..c59154ddfbc 100644
--- a/editors/xemacs/patches/patch-src_glyphs-eimage.c
+++ b/editors/xemacs/patches/patch-src_glyphs-eimage.c
@@ -1,10 +1,8 @@
-$NetBSD: patch-src_glyphs-eimage.c,v 1.1 2012/04/27 13:53:46 hauke Exp $
+$NetBSD: patch-src_glyphs-eimage.c,v 1.2 2015/02/04 09:19:20 hauke Exp $
Fix CVE-2009-2688, via <https://bugzilla.redhat.com/show_bug.cgi?id=511994>
-Adapt to new libpng 1.5 interfaces
-
---- src/glyphs-eimage.c.orig 2007-08-20 19:52:28.000000000 +0000
+--- src/glyphs-eimage.c.orig 2015-01-29 15:04:29.000000000 +0000
+++ src/glyphs-eimage.c
@@ -407,6 +407,7 @@ jpeg_instantiate (Lisp_Object image_inst
*/
@@ -44,57 +42,31 @@ Adapt to new libpng 1.5 interfaces
unwind.eimage = (unsigned char*)
xmalloc (width * height * 3 * unwind.giffile->ImageCount);
if (!unwind.eimage)
-@@ -937,11 +945,15 @@ png_instantiate (Lisp_Object image_insta
- {
- int y;
+@@ -939,7 +947,14 @@ png_instantiate (Lisp_Object image_insta
unsigned char **row_pointers;
-- height = info_ptr->height;
-- width = info_ptr->width;
--
+ height = png_get_image_height(png_ptr, info_ptr);
+ width = png_get_image_width(png_ptr, info_ptr);
+ UINT_64_BIT pixels_sq;
-+ height = png_get_image_height(png_ptr, info_ptr);
-+ width = png_get_image_width(png_ptr, info_ptr);
-+
+
+ pixels_sq = (UINT_64_BIT) width * (UINT_64_BIT) height;
-+ if (pixels_sq > ((size_t) -1) / 3)
-+ signal_image_error ("PNG image too large to instantiate", instantiator);
- /* Wow, allocate all the memory. Truly, exciting. */
-- unwind.eimage = xnew_array_and_zero (unsigned char, width * height * 3);
-+ unwind.eimage = xnew_array_and_zero (unsigned char, pixels_sq * 3);
++ if (pixels_sq > ((size_t) -1) / 3) {
++ signal_image_error ("PNG image too large to instantiate",
++ instantiator);
++ }
++
+ /* Wow, allocate all the memory. Truly, exciting.
+ Well, yes, there's excitement to be had. It turns out that libpng
+ strips in place, so the last row overruns the buffer if depth is 16
+@@ -949,7 +964,7 @@ png_instantiate (Lisp_Object image_insta
+
+ padding = 5 * width;
+ unwind.eimage = xnew_array_and_zero (unsigned char,
+- width * height * 3 + padding);
++ pixels_sq * 3 + padding);
+
/* libpng expects that the image buffer passed in contains a
picture to draw on top of if the png has any transparencies.
- This could be a good place to pass that in... */
-@@ -990,22 +1002,22 @@ png_instantiate (Lisp_Object image_insta
- /* Now that we're using EImage, ask for 8bit RGB triples for any type
- of image*/
- /* convert palette images to full RGB */
-- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE)
- png_set_expand (png_ptr);
- /* send grayscale images to RGB too */
-- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
-- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
-+ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb (png_ptr);
- /* we can't handle alpha values */
-- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
-+ if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
- png_set_strip_alpha (png_ptr);
- /* tell libpng to strip 16 bit depth files down to 8 bits */
-- if (info_ptr->bit_depth == 16)
-+ if (png_get_bit_depth(png_ptr, info_ptr) == 16)
- png_set_strip_16 (png_ptr);
- /* if the image is < 8 bits, pad it out */
-- if (info_ptr->bit_depth < 8)
-+ if (png_get_bit_depth(png_ptr, info_ptr) < 8)
- {
-- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
-+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY)
- png_set_expand (png_ptr);
- else
- png_set_packing (png_ptr);
-@@ -1268,6 +1280,7 @@ tiff_instantiate (Lisp_Object image_inst
+@@ -1286,6 +1301,7 @@ tiff_instantiate (Lisp_Object image_inst
uint32 *raster;
unsigned char *ep;
@@ -102,7 +74,7 @@ Adapt to new libpng 1.5 interfaces
assert (!NILP (data));
-@@ -1290,12 +1303,16 @@ tiff_instantiate (Lisp_Object image_inst
+@@ -1308,12 +1324,16 @@ tiff_instantiate (Lisp_Object image_inst
TIFFGetField (unwind.tiff, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField (unwind.tiff, TIFFTAG_IMAGELENGTH, &height);
diff --git a/editors/xemacs/patches/patch-src_lisp.h b/editors/xemacs/patches/patch-src_lisp.h
index 4e5482d8d76..63e04f31d6a 100644
--- a/editors/xemacs/patches/patch-src_lisp.h
+++ b/editors/xemacs/patches/patch-src_lisp.h
@@ -1,8 +1,6 @@
-$NetBSD: patch-src_lisp.h,v 1.1 2012/04/27 13:53:46 hauke Exp $
+$NetBSD: patch-src_lisp.h,v 1.2 2015/02/04 09:19:20 hauke Exp $
-Fix CVE-2009-2688, via <https://bugzilla.redhat.com/show_bug.cgi?id=511994>
-
---- src/lisp.h.orig 2005-02-01 03:55:02.000000000 +0000
+--- src/lisp.h.orig 2015-01-29 15:04:29.000000000 +0000
+++ src/lisp.h
@@ -265,6 +265,11 @@ void assert_failed (const char *, int, c
/*#define REGISTER register*/
diff --git a/editors/xemacs/patches/patch-ah b/editors/xemacs/patches/patch-src_unexelf.c
index 65a05a08704..2a2849e135b 100644
--- a/editors/xemacs/patches/patch-ah
+++ b/editors/xemacs/patches/patch-src_unexelf.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-ah,v 1.7 2003/02/25 02:14:59 uebayasi Exp $
+$NetBSD: patch-src_unexelf.c,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- src/unexelf.c.orig Tue Aug 20 20:38:23 2002
+--- src/unexelf.c.orig 2015-01-29 15:04:29.000000000 +0000
+++ src/unexelf.c
-@@ -486,7 +486,7 @@
+@@ -494,7 +494,7 @@ typedef struct {
# define ElfBitsW(bits, type) Elf/**/bits/**/_/**/type
# endif
# ifndef ELFSIZE
@@ -11,7 +11,7 @@ $NetBSD: patch-ah,v 1.7 2003/02/25 02:14:59 uebayasi Exp $
# define ELFSIZE 64
# else
# define ELFSIZE 32
-@@ -962,7 +962,7 @@
+@@ -970,7 +970,7 @@ unexec (char *new_name, char *old_name,
memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src,
NEW_SECTION_H (nn).sh_size);
diff --git a/editors/xemacs/patches/patch-ai b/editors/xemacs/patches/patch-src_unexfreebsd.c
index de8c53e04f5..60ad8d402c7 100644
--- a/editors/xemacs/patches/patch-ai
+++ b/editors/xemacs/patches/patch-src_unexfreebsd.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.2 1999/06/29 23:13:41 tron Exp $
+$NetBSD: patch-src_unexfreebsd.c,v 1.1 2015/02/04 09:19:20 hauke Exp $
---- src/unexfreebsd.c.orig Sun Oct 12 02:40:17 1997
-+++ src/unexfreebsd.c Sat Mar 6 11:03:31 1999
-@@ -289,7 +289,7 @@
+--- src/unexfreebsd.c.orig 2015-01-29 15:04:29.000000000 +0000
++++ src/unexfreebsd.c
+@@ -289,7 +289,7 @@ copy_relocation_site (struct relocation_
/* We can get relocation sites in the bss region, for objects whose
contents are copied from a shared library. We don't need or want
to restore these at present. */