com php-src: Fix bug #67716 - Segfault in cdf.c: ext/fileinfo/libmagic/cdf.c

From: Date: Wed, 27 Aug 2014 02:31:44 +0000
Subject: com php-src: Fix bug #67716 - Segfault in cdf.c: ext/fileinfo/libmagic/cdf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81183@lists.php.net to get a copy of this message
Commit: 77b09bfc351d3908b0368beac8787123acacf46c Author: Remi Collet <rcollet@redhat.com> Thu, 14 Aug 2014 17:19:03 -0700 Committer: Ferenc Kovacs <tyrael@php.net> Wed, 27 Aug 2014 04:31:44 +0200 Parents: b6a63b285c8265d57f4563d493411cee423a351b Branches: PHP-5.6.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=77b09bfc351d3908b0368beac8787123acacf46c Log: Fix bug #67716 - Segfault in cdf.c Bugs: https://bugs.php.net/67716 Changed paths: M ext/fileinfo/libmagic/cdf.c Diff: diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c index ad285cf..c86763f 100644 --- a/ext/fileinfo/libmagic/cdf.c +++ b/ext/fileinfo/libmagic/cdf.c @@ -823,7 +823,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; }

« previous php.cvs (#81183) next »