libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit b9cba520417ae7b01bbd59b16a4b180eab3338ae
parent 04d8449af5d2908adce7dfae256bbc0694b8552f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Thu, 13 Jun 2019 13:36:45 +0300

memorypool: removed redundant check, which also fails in case shrinking

Diffstat:
Msrc/microhttpd/memorypool.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c @@ -277,8 +277,7 @@ MHD_pool_reallocate (struct MemoryPool *pool, if (pool->pos == ROUND_TO_ALIGN (old_offset + old_size)) { /* "old" block is the last allocated block */ const size_t new_apos = ROUND_TO_ALIGN (old_offset + new_size); - if ( (new_apos > pool->end) || - (new_apos < pool->pos) ) /* Value wrap */ + if (new_apos > pool->end) return NULL; /* No space */ pool->pos = new_apos;