git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] parse_commit_buffer: don't parse invalid commits
Date: Sat, 19 Jan 2008 11:52:47 -0800	[thread overview]
Message-ID: <7vprvx8ueo.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1200764123283-git-send-email-mkoegler@auto.tuwien.ac.at> (Martin Koegler's message of "Sat, 19 Jan 2008 18:35:23 +0100")

Martin Koegler <mkoegler@auto.tuwien.ac.at> writes:

> * check, that the tree line ends with \n

Ok.

> * prevent parse_commit_date from reading beyond the buffer,
>   - if author line does not end with \n
>   - if committer line does not contain >

"even if" would be nicer, I think.

> * verify in parse_commit_date, that the commiter line ends with \n

Perhaps an additional note to leave for people who will later be
tempted to touch this part of the code is needed; otherwise the
time spent on the thread goes wasted.

 * keep the existing behaviour to return a commit object even
   when non-structural fields such as committer and author are
   malformed, so that tools that need to look at commits to
   clean up a history with such broken commits can still get at
   the structural data (i.e. the parents chain and the tree
   object).

No need to resend if you allow me to amend the patch along the
above lines (please just say so), or you could resend with
improvements on your own.

Thanks.

  reply	other threads:[~2008-01-19 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19 17:35 [PATCH] parse_commit_buffer: don't parse invalid commits Martin Koegler
2008-01-19 19:52 ` Junio C Hamano [this message]
2008-01-20 16:11   ` Martin Koegler
  -- strict thread matches above, loose matches on Subject: below --
2008-01-14 21:20 Martin Koegler
2008-01-15  7:32 ` Johannes Sixt
2008-01-06 19:03 [PATCH] parse_tag_buffer: don't parse invalid tags Martin Koegler
2008-01-06 19:03 ` [PATCH] parse_commit_buffer: don't parse invalid commits Martin Koegler
2008-01-06 22:00   ` Junio C Hamano
2008-01-07  7:40     ` Martin Koegler

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=7vprvx8ueo.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mkoegler@auto.tuwien.ac.at \
    /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).