gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated: memorypool: fixed assert for an e


From: gnunet
Subject: [libmicrohttpd] branch master updated: memorypool: fixed assert for an edge situation
Date: Wed, 07 Oct 2020 14:55:03 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 9665bdd0 memorypool: fixed assert for an edge situation
9665bdd0 is described below

commit 9665bdd0a83f2a8792a4bd324dea927940b3b236
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Oct 7 15:47:36 2020 +0300

    memorypool: fixed assert for an edge situation
---
 src/microhttpd/memorypool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c
index a979c64a..27f7f5ab 100644
--- a/src/microhttpd/memorypool.c
+++ b/src/microhttpd/memorypool.c
@@ -324,7 +324,8 @@ MHD_pool_reallocate (struct MemoryPool *pool,
   mhd_assert (old == NULL || pool->memory + pool->size >= (uint8_t*) old
               + old_size);
   /* Blocks "from the end" must not be reallocated */
-  mhd_assert (old == NULL || pool->memory + pool->pos > (uint8_t*) old);
+  mhd_assert (old == NULL || old_size == 0 || \
+              pool->memory + pool->pos > (uint8_t*) old);
 
   if (0 != old_size)
   {   /* Need to save some data */

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]