[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: I33d1ba3c5c4e3460b81cda46eac2a4eac625b8c3
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>