aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--regex.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 583503d..30019d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-11 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [w3m-dev 02818]
+ * regex.c (regmatch_iter): return 0 if out of range
+
2002-01-11 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02817]
@@ -1837,4 +1842,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.205 2002/01/10 15:43:11 ukai Exp $
+$Id: ChangeLog,v 1.206 2002/01/10 16:11:32 ukai Exp $
diff --git a/regex.c b/regex.c
index aefa0a0..05a964c 100644
--- a/regex.c
+++ b/regex.c
@@ -1,4 +1,4 @@
-/* $Id: regex.c,v 1.8 2002/01/10 15:39:21 ukai Exp $ */
+/* $Id: regex.c,v 1.9 2002/01/10 16:11:32 ukai Exp $ */
/*
* regex: Regular expression pattern match library
*
@@ -554,6 +554,9 @@ regmatch_iter(struct MatchingContext1 *c,
c->re++;
c->firstp = 0;
}
+ if (c->str >= c->end_p) {
+ return 0;
+ }
}
c->lastpos = c->str;
#ifdef REGEX_DEBUG