summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2017-05-09 16:27:20 +0000
committerBrooks Davis <brooks@FreeBSD.org>2017-05-09 16:27:20 +0000
commit18c95b31a490653dce9bb4922d653acb51b303a8 (patch)
tree0d3ddfdf773828f0d0bff94a0e0de3b5672c7aae
parent9d5e08ac670b1974c24637328c5e3f8771225427 (diff)
Notes
-rw-r--r--lib/libc/regex/regcomp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index dfb02c638a4e6..b9e67c60b4025 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -444,6 +444,8 @@ p_ere_exp(struct parse *p)
(void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
/* FALLTHROUGH */
default:
+ if (p->error != 0)
+ return;
p->next--;
wc = WGETNEXT();
ordinary(p, wc);
@@ -651,6 +653,8 @@ p_simp_re(struct parse *p,
(void)REQUIRE(starordinary, REG_BADRPT);
/* FALLTHROUGH */
default:
+ if (p->error != 0)
+ return(0); /* Definitely not $... */
p->next--;
wc = WGETNEXT();
ordinary(p, wc);