From 9b88fc16677aa3c8a424ebe8d3e2e6397581d540 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Aug 2002 19:18:45 +0000 Subject: [PATCH] (parse_reg_exp): If '|' is immediately followed by another '|', end of regex or enclosing ')', clear branch. --- posix/regcomp.c | 2 ++ 1 file changed, 2 insertions(+) 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;