com php-src: catch up with libmagic.orig: ext/fileinfo/libmagic/softmagic.c
| From: | Anatol Belski | Date: | Sun, 29 Mar 2015 15:57:22 +0000 |
| Subject: | com php-src: catch up with libmagic.orig: ext/fileinfo/libmagic/softmagic.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85924@lists.php.net to get a copy of this message | ||
Commit: 5e773b4ce5cafd06cbf6659986385aaa658e1db9
Author: Anatol Belski <ab@php.net> Sun, 29 Mar 2015 17:57:22 +0200
Parents: a935c02210cfef8216924cd0ba3c9f454e21cb41
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5e773b4ce5cafd06cbf6659986385aaa658e1db9
Log:
catch up with libmagic.orig
Changed paths:
M ext/fileinfo/libmagic/softmagic.c
Diff:
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c
index ddf7370..24fa0ec 100644
--- a/ext/fileinfo/libmagic/softmagic.c
+++ b/ext/fileinfo/libmagic/softmagic.c
@@ -1637,7 +1637,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
break;
case FILE_REGEX:
- if (OFFSET_OOB(nbytes, offset, 0))
+ if (nbytes < offset)
return 0;
break;
@@ -1646,7 +1646,8 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset += CAST(uint32_t, o);
if (offset == 0)
return 0;
- if (OFFSET_OOB(nbytes, offset, 0))
+
+ if (nbytes < offset)
return 0;
if ((pb = file_push_buffer(ms)) == NULL)
@@ -1677,7 +1678,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
return rv;
case FILE_USE:
- if (OFFSET_OOB(nbytes, offset, 0))
+ if (nbytes < offset)
return 0;
rbuf = m->value.s;
if (*rbuf == '^') {