summaryrefslogtreecommitdiff
path: root/ext/fileinfo/libmagic/cdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fileinfo/libmagic/cdf.c')
-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;
}