From 5e5b79ae8c1ef7818ad8a05dc457f6418cb5b5ef Mon Sep 17 00:00:00 2001 From: "Philip M. Gollucci" Date: Thu, 10 Dec 2009 07:29:19 +0000 Subject: [PATCH] - Address crashes related to http://tracker.xemacs.org/XEmacs/its/issue630 [1] PR: ports/140899 [1] (based on) Submitted by: Eric Masson --- editors/xemacs/Makefile | 5 ++-- editors/xemacs/files/patch-src__regex.c | 37 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 editors/xemacs/files/patch-src__regex.c diff --git a/editors/xemacs/Makefile b/editors/xemacs/Makefile index 634260865a34..d3cd28611ad8 100644 --- a/editors/xemacs/Makefile +++ b/editors/xemacs/Makefile @@ -7,7 +7,7 @@ PORTNAME= xemacs PORTVERSION= ${XEMACS_VER} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= editors MASTER_SITES= ${MASTER_SITE_XEMACS} MASTER_SITE_SUBDIR= xemacs-${XEMACS_REL} @@ -21,6 +21,8 @@ CONFLICTS= emacs-19.* emacs-21.* emacs-22.* \ xemacs-devel-[0-9]* \ xemacs-mule-[0-9]* xemacs-devel-mule-[0-9]* +MAKE_JOBS_SAFE= yes + XEMACS_REL= 21.4 XEMACS_VER= 21.4.22 XEMACS_ARCH= ${CONFIGURE_TARGET} @@ -106,7 +108,6 @@ WITH_WIDGETS= --with-widgets=athena .if defined(WITH_XAW3D) LIB_DEPENDS+= Xaw3d.${XAWVER}:${PORTSDIR}/x11-toolkits/Xaw3d -MAKE_JOBS_SAFE= yes CONFIGURE_ARGS+= --with-athena=3d .endif .endif diff --git a/editors/xemacs/files/patch-src__regex.c b/editors/xemacs/files/patch-src__regex.c new file mode 100644 index 000000000000..ba9efe52a641 --- /dev/null +++ b/editors/xemacs/files/patch-src__regex.c @@ -0,0 +1,37 @@ +--- ./src/regex.c.orig 2006-03-31 01:29:00.000000000 +0000 ++++ ./src/regex.c 2009-12-10 06:16:16.198040087 +0000 +@@ -3106,9 +3107,6 @@ + normal_char: + { + /* XEmacs: modifications here for Mule. */ +- /* `q' points to the beginning of the next char. */ +- re_char *q = p; +- + /* If no exactn currently being built. */ + if (!pending_exact + +@@ -3116,18 +3114,17 @@ + || pending_exact + *pending_exact + 1 != buf_end + + /* We have only one byte following the exactn for the count. */ +- || ((unsigned int) (*pending_exact + (q - p)) >= +- ((unsigned int) (1 << BYTEWIDTH) - 1)) ++ || *pending_exact >= (1 << BYTEWIDTH) - 1 + + /* If followed by a repetition operator. */ +- || *q == '*' || *q == '^' ++ || (p != pend && (*p == '*' || *p == '^')) + || ((syntax & RE_BK_PLUS_QM) +- ? *q == '\\' && (q[1] == '+' || q[1] == '?') +- : (*q == '+' || *q == '?')) ++ ? p + 1 < pend && *p == '\\' && (p[1] == '+' || p[1] == '?') ++ : p != pend && (*p == '+' || *p == '?')) + || ((syntax & RE_INTERVALS) + && ((syntax & RE_NO_BK_BRACES) +- ? *q == '{' +- : (q[0] == '\\' && q[1] == '{')))) ++ ? p != pend && *p == '{' ++ : p + 1 < pend && (p[0] == '\\' && p[1] == '{')))) + { + /* Start building a new exactn. */ +