summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 95437105b8..89b3e53bab 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2606,7 +2606,7 @@ tryagain:
FAIL("Missing right brace on \\x{}");
else if (UTF) {
numlen = 1; /* allow underscores */
- ender = (UV)scan_hex(p + 1, e - p, &numlen);
+ ender = (UV)scan_hex(p + 1, e - p - 1, &numlen);
/* numlen is generous */
if (numlen + len >= 127) {
p--;