aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-10-01 09:26:03 +0000
committerUlrich Drepper <drepper@redhat.com>2002-10-01 09:26:03 +0000
commita877402c0f14eb9614576cc1b3579a5ca4b683ef (patch)
tree54035576de0bab57bffa37df14a772f86c4e708a
parentdd385d7c7b43cdcee307801c9fc02db5afbde520 (diff)
downloadglibc-a877402c0f14eb9614576cc1b3579a5ca4b683ef.zip
glibc-a877402c0f14eb9614576cc1b3579a5ca4b683ef.tar.gz
glibc-a877402c0f14eb9614576cc1b3579a5ca4b683ef.tar.bz2
Update.
2002-10-01 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex_internal.c (re_string_reconstruct): Reset the member LEN and STOP. * posix/regexec.c (re_search_stub): Remove incorrect condition of "range < 0". Round RANGE in case that it is too small.
-rw-r--r--ChangeLog8
-rw-r--r--posix/regexec.c4
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 42a958f..7cf8087 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-10-01 Isamu Hasegawa <isamu@yamato.ibm.com>
+
+ * posix/regex_internal.c (re_string_reconstruct): Reset the member
+ LEN and STOP.
+ * posix/regexec.c (re_search_stub): Remove incorrect condition of
+ "range < 0".
+ Round RANGE in case that it is too small.
+
2002-10-01 Roland McGrath <roland@frob.com>
* config.h.in (NO_HIDDEN): New #undef.
diff --git a/posix/regexec.c b/posix/regexec.c
index 8988c66..7e3a832 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -357,10 +357,12 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
int eflags = 0;
/* Check for out-of-range. */
- if (BE (start < 0 || start > length || range < 0, 0))
+ if (BE (start < 0 || start > length, 0))
return -1;
if (BE (start + range > length, 0))
range = length - start;
+ else if (BE (start + range < 0, 0))
+ range = -start;
eflags |= (bufp->not_bol) ? REG_NOTBOL : 0;
eflags |= (bufp->not_eol) ? REG_NOTEOL : 0;