From: cgit at cryptocrack.de (Lukas Fleischer)
Subject: [PATCH] Use split_ident_line() in parse_user()
Date: Wed, 24 Dec 2014 08:49:04 +0100 [thread overview]
Message-ID: <20141224074904.15117.52957@typhoon.lan> (raw)
In-Reply-To: <CAHmME9rZnDWrSzppL--em9cNXwqzK_+uBk=YBpLnsp++O8Tz-Q@mail.gmail.com>
On Wed, 24 Dec 2014 at 02:57:45, Jason A. Donenfeld wrote:
> On Wed, Dec 17, 2014 at 5:19 AM, Lukas Fleischer <cgit at cryptocrack.de>
> wrote:
>
> > Use Git's built-in ident line splitting algorithm instead of
> > reimplementing it. This does not only simplify the code but also makes
> > sure that cgit is consistent with Git when it comes to author parsing.
> >
>
> Thank heavens!
>
> > + email_len = ident.mail_end - ident.mail_begin;
> > + *email = xmalloc(strlen("<") + email_len + strlen(">\0"));
> > + sprintf(*email, "<%.*s>", email_len, ident.mail_begin);
> > +
> >
>
> strlen(">\0") -- isn't the null superfluous? Cleanup and resubmit?
I think this is even wrong because it means the buffer won't be large
enough to hold the terminating null character. Will resubmit.
next prev parent reply other threads:[~2014-12-24 7:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 12:19 cgit
2014-12-24 1:57 ` Jason
2014-12-24 7:49 ` cgit [this message]
2014-12-24 7:50 ` [PATCH v2] " cgit
2014-12-24 8:38 ` Jason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141224074904.15117.52957@typhoon.lan \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).