aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-12 19:18:45 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-12 19:18:45 +0000
commit9b88fc16677aa3c8a424ebe8d3e2e6397581d540 (patch)
tree71282c390bcc68140965868c7d26a997554741a5 /posix
parentf7c1f4dd1cc23e3defe17651a16e16b5f6ca8346 (diff)
downloadglibc-9b88fc16677aa3c8a424ebe8d3e2e6397581d540.tar
glibc-9b88fc16677aa3c8a424ebe8d3e2e6397581d540.tar.gz
glibc-9b88fc16677aa3c8a424ebe8d3e2e6397581d540.tar.bz2
glibc-9b88fc16677aa3c8a424ebe8d3e2e6397581d540.zip
(parse_reg_exp): If '|' is immediately followed by another '|', end of regex or enclosing ')', clear branch.
Diffstat (limited to 'posix')
-rw-r--r--posix/regcomp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 0613de6553..9406383283 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1807,6 +1807,8 @@ parse_reg_exp (regexp, preg, token, syntax, nest, err)
return NULL;
}
}
+ else
+ branch = NULL;
tree = create_tree (tree, branch, 0, new_idx);
if (BE (new_idx == -1 || tree == NULL, 0))
return *err = REG_ESPACE, NULL;