summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mime_magic/mime_magic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c
index 1a8e1e7be8..595fe6b17a 100644
--- a/ext/mime_magic/mime_magic.c
+++ b/ext/mime_magic/mime_magic.c
@@ -1425,7 +1425,7 @@ static int mget(union VALUETYPE *p, unsigned char *s,
{
long offset = m->offset;
- if (offset + sizeof(union VALUETYPE) > nbytes)
+ if (offset + (long)sizeof(union VALUETYPE) > nbytes)
return 0;
memcpy(p, s + offset, sizeof(union VALUETYPE));
@@ -1447,7 +1447,7 @@ static int mget(union VALUETYPE *p, unsigned char *s,
break;
}
- if (offset + sizeof(union VALUETYPE) > nbytes)
+ if (offset + (long)sizeof(union VALUETYPE) > nbytes)
return 0;
memcpy(p, s + offset, sizeof(union VALUETYPE));