apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: bug in apr_rmm_realloc
Date Fri, 05 Aug 2005 10:45:25 GMT
On Thu, Aug 04, 2005 at 01:33:47PM -0700, Keith Kelleman wrote:
> Possible bug in apr_rmm_realloc.   When calculating the value of
> blk, it looks like it should be:
> 
> blk = (rmm_block_t*)((char*)rmm->base + old - RMM_BLOCK_SIZE);
> 
> instead of
> 
> blk = (rmm_block_t*)((char*)rmm->base + old);
> 
> otherwise blk is pointing at the caller's data.

Good catch, thanks.  I've committed this change and extended the test 
case for _realloc to check it properly.

joe

Mime
View raw message