git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] branch.c: delete size check of newly tracked branch names

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 28, 2014, 12:43 UTC
Message-ID
<CACsJy8BaGL9EQW87MSC98sKTfN6V9tPbqWXPAtM+nvoxV_NShg@mail.gmail.com>
In-Reply-To
<CAL0uuq263WEFWvZFDeqdN4=fAJGPUtux2wwFGOUQEMfzmDOweQ@mail.gmail.com>

On Fri, Feb 28, 2014 at 7:14 PM, Jacopo Notarstefano <jacopo.notarstefano@gmail.com> wrote:

Show 12 quoted lines
>> Nice. new_ref is passed in install_branch_config() in latest code. I
>> guess you already made sure this function did not make any assumption
>> about new_ref's length?
>>
>
> The function install_branch_config uses the strbuf, as I wrote in the
> commit message. The contents of this buffer are then fed to
> git_config_set, which, after a few more function calls, parses the key
> with git_config_parse_key. This function does not rely on any
> assumptions (as far as I can tell!) on the name's length, and
> allocates enough space for it in
> https://github.com/git/git/blob/master/config.c#L1462.
Thanks for checking!
-- 
Duy
Previous: Jacopo Notarstefano
Message 5 of 5 in “branch.c: delete size check of newly tracked branch names”
  1. branch.c: delete size check of newly tracked branch namesJacopo Notarstefano, Feb 28, 2014
  2. Jacopo NotarstefanoFeb 28, 2014
  3. Duy NguyenFeb 28, 2014
  4. Jacopo NotarstefanoFeb 28, 2014
  5. Duy NguyenFeb 28, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.