Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Oct 1, 2002
1 parent dd385d7 commit a877402
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 3 additions & 1 deletion posix/regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a877402

Please sign in to comment.