Subject: Re: [PATCH] diff: avoid stack-buffer-read-overrun for very long name

From: Junio C Hamano <[email-masked]>
Date: Fri, 27 Apr 2012 08:07:55 -0700

Andreas Ericsson <[email-masked]> 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.