diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 08:19:27 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 08:19:27 (GMT) |
commit | 5789086c242edb45e3f35a00932a66458302e27d (patch) | |
tree | 1b1a1034a110bf8f9f22e1d55aa249324d487c34 /generic/regcomp.c | |
parent | db61e9a4be70f2f32de14debac56862039d8cb78 (diff) | |
parent | 40259312feb06aebd4481c9f8592dc6ac10bb1b4 (diff) | |
download | tcl-5789086c242edb45e3f35a00932a66458302e27d.zip tcl-5789086c242edb45e3f35a00932a66458302e27d.tar.gz tcl-5789086c242edb45e3f35a00932a66458302e27d.tar.bz2 |
[Bug 3606139]: missing error check allows regexp to crash Tcl. Thanks to Tom Lane for providing the test-case and the patch.
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r-- | generic/regcomp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c index 65555aa..b15117b 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -738,6 +738,7 @@ parsebranch( /* NB, recursion in parseqatom() may swallow rest of branch */ parseqatom(v, stopper, type, lp, right, t); + NOERRN(); } if (!seencontent) { /* empty branch */ @@ -1234,6 +1235,7 @@ parseqatom( EMPTYARC(atom->end, rp); t->right = subre(v, '=', 0, atom->end, rp); } + NOERR(); assert(SEE('|') || SEE(stopper) || SEE(EOS)); t->flags |= COMBINE(t->flags, t->right->flags); top->flags |= COMBINE(top->flags, t->flags); |