Re: [PATCH v2 1/2] strbuf: make sure buffer is zero-terminated
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 11, 2011, 21:49 UTC
- Message-ID
- <7v8vvgtq55.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <BANLkTinKzatY-1kxLJ73TeDyMW175pr77A@mail.gmail.com>
Erik Faye-Lund <kusmabite@gmail.com> writes:
Show 5 quoted lines
> You're right. How about something like this instead? > > strbuf_init does not zero-terminate the initial buffer when hint is > non-zero. Fix this so we can rely on the string to be zero-terminated > even if we haven't filled it with anything yet.
Sounds sensible. Thanks, both.