This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Allocate sufficient space for string buffer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]