From: Ulrich Drepper Date: Sun, 10 Jun 2001 06:51:02 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/pre-lgplv2_1~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e10a9ebaa658d1b9e467556053cf7634f8d1b9fd;p=thirdparty%2Fglibc.git Update. 2001-06-08 Andreas Schwab * posix/regex.c (re_match_2_internal) [case wordbeg, wordend]: Don't dereference at end of string. --- diff --git a/ChangeLog b/ChangeLog index 4eb9f1ecec2..5fa72015d8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-08 Andreas Schwab + + * posix/regex.c (re_match_2_internal) [case wordbeg, wordend]: + Don't dereference at end of string. + 2001-06-06 Roland McGrath * sysdeps/mach/hurd/getsockopt.c: Fix handling of returned buffer size. diff --git a/posix/regex.c b/posix/regex.c index ca4645945ec..086de080849 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -7094,14 +7094,15 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) case wordbeg: DEBUG_PRINT1 ("EXECUTING wordbeg.\n"); - if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1))) + if (!AT_STRINGS_END (d) && WORDCHAR_P (d) + && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1))) break; goto fail; case wordend: DEBUG_PRINT1 ("EXECUTING wordend.\n"); if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1) - && (!WORDCHAR_P (d) || AT_STRINGS_END (d))) + && (AT_STRINGS_END (d) || !WORDCHAR_P (d))) break; goto fail;