[CVE-2009-5155] Diagnose ERE '()|\1'
Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
* lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
track of the set of previously-completed subexpressions available
before the first alternative, and restore this set just before
parsing each subsequent alternative. This lets us diagnose the
invalid back-reference in the ERE '()|\1'.
Change-Id: Ib33e473e4935044e4c8b4ad4013644d290a6876c
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>