Re: [PATCH 1/2] Change error messages in ident.c...
- From
Jeff King <peff@peff.net>
- Date
- May 11, 2012, 23:13 UTC
- Message-ID
- <20120511231303.GA24611@sigill.intra.peff.net>
- In-Reply-To
- <7vehqqjpmw.fsf@alter.siamese.dyndns.org>
On Fri, May 11, 2012 at 03:53:43PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> >> I am also tempted to suggest that we simply replace the static buffers
> >> with dynamic strbufs. I guess that may open up new vectors for an
> >> attacker to convince git to allocate arbitrary amounts of memory, but
> >> that is already pretty easy to do, so I doubt it's a big deal.
> >
> > For reference, that patch would look like something like this:
>
> Looks quite straight-forward and readable, I would say. Not only you gave
> us a legitimate excuse to get rid of the humourous messages, you lifted
> most of the artificial limitations ('domainname' limit is still there but
> that is not anything new) and use of strlcpy(), the last of which is a
> huge win from my point of view ;-)Thanks. I'll re-roll with a commit message, and a follow-on patch to fix the "you don't exist" message. But probably tomorrow, as I am just finishing gitting for the day.
-Peff