summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index e9617a628f..8c795051a7 100644
--- a/regex.c
+++ b/regex.c
@@ -4017,7 +4017,7 @@ re_match(bufp, string_arg, size, pos, regs)
else
break;
}
- if ((enum regexpcode)*p1 == jump)
+ if (p1 < pend && (enum regexpcode)*p1 == jump)
p[-1] = unused;
else
PUSH_FAILURE_POINT(0, 0);