[CVE-2009-5155] Diagnose ERE '()|\1' 69/255169/1 accepted/tizen/6.5/base/tool/20211027.121832 accepted/tizen/base/tool/20210324.043613 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.201201 submit/tizen_base/20210315.022743 submit/tizen_base/20210316.012104 submit/tizen_base/20210318.002005 tizen_6.5.m2_release
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 19 Sep 2015 20:53:34 +0000 (13:53 -0700)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 15 Mar 2021 02:16:37 +0000 (11:16 +0900)
commitfcdbb823325df41421408567144c2d7c1bb3e564
treed47cbc54ab1c06be974cf9ee014d4944a2ba6b9d
parent7ead692bcf0e3aacd3eb9ff0a14811a9122c5c57
[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>
gnulib/lib/regcomp.c