[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Bug in ber_realloc?



At 03:07 PM 6/9/99 -0700, Alex Zeltser wrote:
>I may have hit another potential bug here.  In ber_memrealloc I don't think
>we take into consideration the size of our debug block header when calling
>realloc.  We correctly get the 'real' pointer by subtracting sizeof (struct
>mer_mem_hdr) from the passed pointer and pass that to realloc; however, we
>don't adjust the size 's' that was passed in to include the header in the
>newly allocated block.

Yes, that's a bug (fix committed).  I actually hadn't meant to
enable this code in portable.h.nt just yet.  NT _DEBUG will
already assert if the wrong heap is used.  Though I developed
this code on NT, I actually meant it to be used by UNIX
developers.

	Kurt