diff options
author | Anatol Belski <ab@php.net> | 2015-03-29 17:57:22 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-03-29 17:57:22 +0200 |
commit | 5e773b4ce5cafd06cbf6659986385aaa658e1db9 (patch) | |
tree | 67bf918e13ab37981c50cc372be2df7a15e4c150 /ext/fileinfo/libmagic/softmagic.c | |
parent | a935c02210cfef8216924cd0ba3c9f454e21cb41 (diff) | |
download | php-git-5e773b4ce5cafd06cbf6659986385aaa658e1db9.tar.gz |
catch up with libmagic.orig
Diffstat (limited to 'ext/fileinfo/libmagic/softmagic.c')
-rw-r--r-- | ext/fileinfo/libmagic/softmagic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c index ddf7370b50..24fa0ec436 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 == '^') { |