+2014-06-20 Andreas Schwab <schwab@linux-m68k.org>
+
+ [BZ #17069]
+ * posix/regcomp.c (parse_reg_exp): Deallocate partially
+ constructed tree before returning error.
+ * posix/bug-regexp36.c: Expand test case.
+
2014-06-19 Andreas Schwab <schwab@linux-m68k.org>
[BZ #17069]
* The following bugs are resolved with this release:
15946, 16545, 16574, 16623, 16882, 16885, 16916, 16932, 16943, 16958,
- 17048.
+ 17048, 17069.
* CVE-2014-4043 The posix_spawn_file_actions_addopen implementation did not
copy the path argument. This allowed programs to cause posix_spawn to
-/* Test regcomp not leaking memory on invalid repetition operator
+/* Test regcomp not leaking memory on parse errors
Copyright (C) 2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
{
regex_t r;
mtrace ();
- regcomp (&r, "[a]\\{-2,}", 0);
+ regcomp (&r, "[a]\\|[a]\\{-2,}", 0);
regfree (&r);
}
{
branch = parse_branch (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && branch == NULL, 0))
- return NULL;
+ {
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
+ return NULL;
+ }
}
else
branch = NULL;