summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-php/modphp/files/php-CVE-2014-3587.patch
blob: e1c40f244d50dee3a09706d4b1e5f02f13a14906 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
modphp: Security Advisory - php - CVE-2014-3587

Upstream-Status: Backport

Signed-off-by: Yue Tao <yue.tao@windriver.com>

From 7ba1409a1aee5925180de546057ddd84ff267947 Mon Sep 17 00:00:00 2001
From: Remi Collet <rcollet@redhat.com>
Date: Thu, 14 Aug 2014 17:19:03 -0700
Subject: [PATCH] Fix bug #67716 - Segfault in cdf.c

---
 ext/fileinfo/libmagic/cdf.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index 429f3b9..2c0a2d9 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;
 		}
-- 
1.7.9.5