diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-01-08 00:47:30 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-01-08 00:47:30 +0000 |
commit | 76c7f2cd8a68653b4fd60c1f12bf0b8b824209f1 (patch) | |
tree | 7b00d01fa07a21540e5572aec060ce484be4f665 | |
parent | bdb56bacd57070eced9998569ffe3f3c37ef5964 (diff) | |
download | glibc-cvs/fedora-glibc-20090108T0952.tar.gz glibc-cvs/fedora-glibc-20090108T0952.tar.xz glibc-cvs/fedora-glibc-20090108T0952.zip |
[BZ 697] cvs/fedora-glibc-20090108T0952
* posix/regexec.c (prune_impossible_nodes): Handle sifted_states[0] being NULL also if there are no backreferences. * posix/rxspencer/tests: Add testcases.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | posix/regexec.c | 7 | ||||
-rw-r--r-- | posix/rxspencer/tests | 4 |
3 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 8829b444bd..17e987b57e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-05 Paolo Bonzini <bonzini@gnu.org> + + [BZ 697] + * posix/regexec.c (prune_impossible_nodes): Handle sifted_states[0] + being NULL also if there are no backreferences. + * posix/rxspencer/tests: Add testcases. + 2009-01-04 Paolo Bonzini <bonzini@gnu.org> [BZ 9697] diff --git a/posix/regexec.c b/posix/regexec.c index 135efe7441..7bf0c08a78 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. @@ -1004,6 +1004,11 @@ prune_impossible_nodes (mctx) re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; + if (sifted_states[0] == NULL) + { + ret = REG_NOMATCH; + goto free_return; + } } re_free (mctx->state_log); mctx->state_log = sifted_states; diff --git a/posix/rxspencer/tests b/posix/rxspencer/tests index b84a270cda..3ad46e2a61 100644 --- a/posix/rxspencer/tests +++ b/posix/rxspencer/tests @@ -536,3 +536,7 @@ a.*\b & abT ab \B & aSbTc \B & SaT @SaT \B & aSTSb @TSb + +o$($|.) - oN +o$($|.) - op +o$($|.) - o o |