diff options
Diffstat (limited to 'memory/unix/apr_pools.c')
-rw-r--r-- | memory/unix/apr_pools.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c index 059af143a..9fe5bcc17 100644 --- a/memory/unix/apr_pools.c +++ b/memory/unix/apr_pools.c @@ -612,7 +612,7 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size) active = pool->active; /* If the active node has enough bytes left, use it. */ - if (size < active->endp - active->first_avail) { + if (active->first_avail + size < active->endp) { mem = active->first_avail; active->first_avail += size; @@ -620,7 +620,7 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size) } node = active->next; - if (size < node->endp - node->first_avail) { + if (node->first_avail + size < node->endp) { *node->ref = node->next; node->next->ref = node->ref; } @@ -925,7 +925,7 @@ static int psprintf_flush(apr_vformatter_buff_t *vbuff) size = APR_PSPRINTF_MIN_STRINGSIZE; node = active->next; - if (!ps->got_a_new_node && size < node->endp - node->first_avail) { + if (!ps->got_a_new_node && (node->first_avail + size < node->endp)) { *node->ref = node->next; node->next->ref = node->ref; |