From 6fb6a272171f49c79ba6ab7c6403eb25b39ec1b2 Mon Sep 17 00:00:00 2001 From: ellie timoney 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