summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRemi Collet <rcollet@redhat.com>2014-08-14 17:19:03 -0700
committerStanislav Malyshev <stas@php.net>2014-08-14 17:19:03 -0700
commit49387b31cf8bda25a85b6932380001be03d6c8b0 (patch)
tree8b8fed3a57df46882393fa3df735b8f20209a313 /ext
parenteab42649ab9c6d949dc8e1ba9e31124e9cfb3b1b (diff)
downloadphp-git-49387b31cf8bda25a85b6932380001be03d6c8b0.tar.gz
Fix bug #67716 - Segfault in cdf.c
Diffstat (limited to 'ext')
-rw-r--r--ext/fileinfo/libmagic/cdf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index 429f3b952f..2c0a2d9dfc 100644
--- a/ext/fileinfo/libmagic/cdf.c
+++ b/ext/fileinfo/libmagic/cdf.c
@@ -820,7 +820,7 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
q = (const uint8_t *)(const void *)
((const char *)(const void *)p + ofs
- 2 * sizeof(uint32_t));
- if (q > e) {
+ if (q < p || q > e) {
DPRINTF(("Ran of the end %p > %p\n", q, e));
goto out;
}