PATCH: Allocate sufficient space for string buffer

Alan Modra amodra@gmail.com
Fri Jun 8 03:51:00 GMT 2012


On Thu, Jun 07, 2012 at 07:36:31PM -0700, H.J. Lu wrote:
> If ptr->len + len == ptr->max, we double the size.
> Should it be changed to
> 
> while (ptr->len + len > max)

Err, yes.  ptr->max doesn't take into account the terminator.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list