Re: [PATCH] diff: avoid stack-buffer-read-overrun for very long name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 27, 2012, 15:07 UTC
- Message-ID
- <xmqqmx5x9pro.fsf@junio.mtv.corp.google.com>
- In-Reply-To
- <4F9A972E.7050401@op5.se>
Andreas Ericsson <ae@op5.se> writes:
>> I am not good at names, but strbuf_terminate_with(&buffer2, '/') >> perhaps? >> > "terminate" sounds pretty final though.
Yeah, but that function is adding a record terminator to the buffer, so...
> How about strbuf_ensure_suffixch()? > It embeds the 'ch', marking it as a char argument...
Perhaps.