From: Eric Sunshine Date: Tue, 18 Jun 2013 04:15:52 GMT Subject: Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times Message-ID: In-Reply-To: <1371520840-24906-1-git-send-email-bcasey@nvidia.com> On Mon, Jun 17, 2013 at 10:00 PM, Brandon Casey wrote: > From: Brandon Casey > > 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/ > each time. > > But it's unnecessary and potentially dangerous, so let's avoid it. > > Signed-off-by: Brandon Casey