summaryrefslogtreecommitdiff
path: root/lib/Support/regcomp.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
commit5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch)
treea6140557876943cdd800ee997c9317283394b22c /lib/Support/regcomp.c
parentf03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff)
Diffstat (limited to 'lib/Support/regcomp.c')
-rw-r--r--lib/Support/regcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/regcomp.c b/lib/Support/regcomp.c
index b79692966473d..ebde64f9cf751 100644
--- a/lib/Support/regcomp.c
+++ b/lib/Support/regcomp.c
@@ -1422,7 +1422,7 @@ enlarge(struct parse *p, sopno size)
if (p->ssize >= size)
return;
- if ((unsigned long)size > SIZE_MAX / sizeof(sop)) {
+ if ((uintptr_t)size > SIZE_MAX / sizeof(sop)) {
SETERROR(REG_ESPACE);
return;
}
@@ -1443,7 +1443,7 @@ static void
stripsnug(struct parse *p, struct re_guts *g)
{
g->nstates = p->slen;
- if ((unsigned long)p->slen > SIZE_MAX / sizeof(sop)) {
+ if ((uintptr_t)p->slen > SIZE_MAX / sizeof(sop)) {
g->strip = p->strip;
SETERROR(REG_ESPACE);
return;