summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 5c06ada1b..d7c577077 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2228,7 +2228,7 @@ regatom(int *flagp)
default: i = -1; break;
}
- if (i < 0)
+ if (i < 0 || i > INT_MAX)
EMSG2_RET_NULL(
_("E678: Invalid character after %s%%[dxouU]"),
reg_magic == MAGIC_ALL);
@@ -3293,7 +3293,7 @@ coll_get_char(void)
case 'u': nr = gethexchrs(4); break;
case 'U': nr = gethexchrs(8); break;
}
- if (nr < 0)
+ if (nr < 0 || nr > INT_MAX)
{
/* If getting the number fails be backwards compatible: the character
* is a backslash. */