Fix an off-by-one error, which could lead to a crash.

This commit is contained in:
jasper 2011-04-08 06:21:46 +00:00
parent bc09f7f780
commit 840555b27c
2 changed files with 18 additions and 2 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.64 2011/04/08 06:20:35 jasper Exp $
# $OpenBSD: Makefile,v 1.65 2011/04/08 06:21:46 jasper Exp $
# $FreeBSD: Makefile,v 1.10 1998/03/28 14:36:34 steve Exp $
COMMENT= X11/Motif GUI text editor
DISTNAME= nedit-5.5
P_V= 0.5
REVISION= 15
REVISION= 16
DISTFILES= ${DISTNAME}-src${EXTRACT_SUFX} \
nedit_patterns-${P_V}.tgz:0
PATCHFILES= wrapmark.diff:0

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-source_regularExp_c,v 1.1 2011/04/08 06:21:46 jasper Exp $
Fix an off-by-one error, which could lead to a crash.
From upstream CVS: https://sourceforge.net/tracker/index.php?func=detail&aid=2858723&group_id=11005&atid=111005
--- source/regularExp.c.orig Thu Apr 7 22:28:54 2011
+++ source/regularExp.c Thu Apr 7 22:29:14 2011
@@ -2645,7 +2645,7 @@ static struct brace_counts *Brace;
/* Default table for determining whether a character is a word delimiter. */
-static unsigned char Default_Delimiters [UCHAR_MAX] = {0};
+static unsigned char Default_Delimiters [UCHAR_MAX+1] = {0};
static unsigned char *Current_Delimiters; /* Current delimiter table */