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

Re: git-send-pack SIGSEGV..

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jun 15, 2007, 07:24 UTC
Message-ID
<81b0412b0706150024m6a3c4d0bx866e1b25e770d299@mail.gmail.com>
In-Reply-To
<7vr6od92nj.fsf@assigned-by-dhcp.pobox.com>
On 6/15/07, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> --- a/remote.c
> +++ b/remote.c
> @@ -252,6 +252,8 @@ static struct refspec *parse_ref_spec
>                         ep = gp;
>                 }
>                 rs[i].src = xstrndup(sp, ep - sp);
> +               if (rs[i].pattern && !rs[i].dst)
> +                       rs[i].dst = xstrdup(rs[i].src);

It may be possible to just reuse rs[i].src - there is no deallocation of refspecs anywhere nor are src or dst detached from refspec (which may be bad, but probably is covered in libification effort).

Previous: Junio C HamanoNext: Daniel Barkalow
Message 5 of 10 in “git-send-pack SIGSEGV..”
  1. Linus TorvaldsJun 15, 2007
  2. Linus TorvaldsJun 15, 2007
  3. Junio C HamanoJun 15, 2007
  4. Junio C HamanoJun 15, 2007
  5. Alex RiesenJun 15, 2007
  6. Daniel BarkalowJun 15, 2007
  7. Linus TorvaldsJun 15, 2007
  8. Junio C HamanoJun 16, 2007
  9. Daniel BarkalowJun 16, 2007
  10. Junio C HamanoJun 16, 2007

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.