diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 08:12:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-27 08:12:33 (GMT) |
commit | 40259312feb06aebd4481c9f8592dc6ac10bb1b4 (patch) | |
tree | 30a48979b46f147313fb84c66a8a86b619308354 /generic | |
parent | da40794df6988d5d3fb421994dbec31002e0350a (diff) | |
parent | 6332e3ad602e2d2cab2083e7cdfac439678a903f (diff) | |
download | tcl-40259312feb06aebd4481c9f8592dc6ac10bb1b4.zip tcl-40259312feb06aebd4481c9f8592dc6ac10bb1b4.tar.gz tcl-40259312feb06aebd4481c9f8592dc6ac10bb1b4.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')
-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 6dea04b..ca4fc01 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); |