mirror of
https://git.freebsd.org/ports.git
synced 2025-06-23 13:40:34 -04:00
Obtained from: https://cyrus.foundation/cyrus-imapd/patch/?id=745e161c834f1eb6d62fc14477f51dae799e1e08, https://cyrus.foundation/cyrus-imapd/patch/?id=6fb6a272171f49c79ba6ab7c6403eb25b39ec1b2 MFH: 2015Q4 Security: d62ec98e-97d8-11e5-8c0e-080027b00c2e
23 lines
788 B
Text
23 lines
788 B
Text
From 6fb6a272171f49c79ba6ab7c6403eb25b39ec1b2 Mon Sep 17 00:00:00 2001
|
|
From: ellie timoney <ellie@fastmail.com>
|
|
Date: Mon, 26 Oct 2015 16:21:01 +1100
|
|
Subject: urlfetch: and the other bit
|
|
|
|
|
|
diff --git a/imap/index.c b/imap/index.c
|
|
index f5161cd..da8ce3d 100644
|
|
--- imap/index.c
|
|
+++ imap/index.c
|
|
@@ -4244,7 +4244,8 @@ EXPORTED int index_urlfetch(struct index_state *state, uint32_t msgno,
|
|
size_t section_offset = CACHE_ITEM_BIT32(cacheitem);
|
|
size_t section_size = CACHE_ITEM_BIT32(cacheitem + CACHE_ITEM_SIZE_SKIP);
|
|
|
|
- if (section_offset + section_size > size) {
|
|
+ if (section_offset + section_size < section_offset
|
|
+ || section_offset + section_size > size) {
|
|
r = IMAP_INTERNAL;
|
|
goto done;
|
|
}
|
|
--
|
|
cgit v0.10.2
|
|
|