Subject: Re: [PATCH 2/2] entry.c: convert write_entry to use strbuf

From: Junio C Hamano <[email-masked]>
Date: Thu, 24 Oct 2013 12:49:30 -0700

Duy Nguyen <[email-masked]> writes:

> On Thu, Oct 24, 2013 at 12:52 AM, Junio C Hamano <[email-masked]> wrote:
>> Nguyễn Thái Ngọc Duy <[email-masked]> writes:
>>
>>> The strcpy call in open_output_fd() implies that the output buffer
>>> must be at least 25 chars long.
>>
>> Hmph, where does that 25 come from?
>>
>> [snipped]
>
> Much better. Thanks.

So where does that 25 come from?

We strcpy ".merge_link_XXXXXX" or ".merge_file_XXXXXX" into path[]
and run mkstemp() on it, and these templates are 18 bytes long, so I
am puzzled.

Is 25 "just a small random number that is surely longer than these
templates--did not bother to count how long the templates are"?
That's fine by me; I am just trying to make sure I am not missing
anything that turns these templates into a longer filename.

Thanks.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to [email-masked]
To unsubscribe from this group, send email to
[email-masked]
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email-masked].
For more options, visit https://groups.google.com/groups/opt_out.