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

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 18, 2013, 04:15 UTC
Message-ID
<CAPig+cTKBzfrB6QQ4qjHNknv1CKRro_t=f77OV+ZhabtMN6Uiw@mail.gmail.com>
In-Reply-To
<1371520840-24906-1-git-send-email-bcasey@nvidia.com>
On Mon, Jun 17, 2013 at 10:00 PM, Brandon Casey <bcasey@nvidia.com> wrote:
Show 11 quoted lines
> From: Brandon Casey <drafnel@gmail.com>
>
> Curl requires that we manage any strings that we pass to it as pointers.
> So, we should not be overwriting this strbuf after we've passed it to
> curl.
>
> Additionally, it is unnecessary since we only prompt for the user name
> and password once, so we end up overwriting the strbuf with the same
> sequence of characters each time.  This is why in practice it has not
> caused any problems for git's use of curl; the internal strbuf char
> pointer does not change, and get's overwritten with the same string
s/get's/gets/
Show 5 quoted lines
> each time.
>
> But it's unnecessary and potentially dangerous, so let's avoid it.
>
> Signed-off-by: Brandon Casey <drafnel@gmail.com>
Previous: Brandon CaseyNext: Jeff King
Message 2 of 11 in “http.c: don't rewrite the user:passwd string multiple times”
  1. http.c: don't rewrite the user:passwd string multiple timesBrandon Casey, Jun 18, 2013
  2. Eric SunshineJun 18, 2013
  3. Jeff KingJun 18, 2013
  4. Daniel StenbergJun 18, 2013
  5. Junio C HamanoJun 18, 2013
  6. Brandon CaseyJun 18, 2013
  7. Jeff KingJun 18, 2013
  8. Brandon CaseyJun 19, 2013
  9. http.c: don't rewrite the user:passwd string multiple timesBrandon Casey, Jun 19, 2013
  10. Jeff KingJun 19, 2013
  11. Daniel StenbergJun 19, 2013

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.