Add patch-regex.c to handle an overflow which is caused by long lines

produced by compile and make output in xemacs.

PR: 		ports/62437
Submitted by:	Palle Girgensohn <girgen@pingpong.net>
This commit is contained in:
Gary Jennejohn 2004-04-18 20:28:17 +00:00
parent 52ac957b88
commit ad76ce6da9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=107488
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- src/regex.c.orig Sun Apr 18 22:19:13 2004
+++ src/regex.c Sun Apr 18 22:18:40 2004
@@ -1322,7 +1322,7 @@
exactly that if always used MAX_FAILURE_SPACE each time we failed.
This is a variable only so users of regex can assign to it; we never
change it ourselves. */
-#if defined (MATCH_MAY_ALLOCATE)
+#if defined (MATCH_MAY_ALLOCATE) || defined (REGEX_MALLOC)
/* 4400 was enough to cause a crash on Alpha OSF/1,
whose default stack limit is 2mb. */
int re_max_failures = 20000;

View file

@ -0,0 +1,11 @@
--- src/regex.c.orig Sun Apr 18 22:13:51 2004
+++ src/regex.c Sun Apr 18 22:14:57 2004
@@ -1135,7 +1135,7 @@
exactly that if always used MAX_FAILURE_SPACE each time we failed.
This is a variable only so users of regex can assign to it; we never
change it ourselves. */
-#if defined (MATCH_MAY_ALLOCATE)
+#if defined (MATCH_MAY_ALLOCATE) || defined (REGEX_MALLOC)
/* 4400 was enough to cause a crash on Alpha OSF/1,
whose default stack limit is 2mb. */
int re_max_failures = 20000;