public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Lukas Sandström" <lukass@etek•chalmers.se>
To: Junio C Hamano <gitster@pobox•com>
Cc: "Git Mailing List" <git@vger•kernel.org>,
	"Lukas Sandström" <lukass@etek•chalmers.se>
Subject: Re: [PATCH] git-mailinfo: Fix getting the subject from the body
Date: Fri, 11 Jul 2008 00:37:36 +0200	[thread overview]
Message-ID: <48768F30.8070409@etek.chalmers.se> (raw)
In-Reply-To: <7vod55o0tx.fsf@gitster.siamese.dyndns.org>

Junio C Hamano wrote:
> Lukas Sandström <lukass@etek•chalmers.se> writes:
> 
>> "Subject: " isn't in the static array "header", and thus
>> memcmp("Subject: ", header[i], 7) will never match.
>>
>> Signed-off-by: Lukas Sandström <lukass@etek•chalmers.se>
>> ---
>>
>> This has been broken since 2007-03-12, with commit
>> 87ab799234639c26ea10de74782fa511cb3ca606
>> so it might not be very important.
> 
> Wow, thanks.  Perhaps we would want some additional test scripts?

Yes, apparently.

After looking at this part some more, I see that there is no guarantee
that hdr_data[i] != NULL in this codepath, and then we won't use the
subject anyway.

I'm currently working on rewriting git-mailinfo to use strbuf's insted
of the preallocated buffers currently used. Do you want me to send a
patch allocating hdr_data[i], or can you wait for my strbuf-conversion
patch? It'll propably be ready for review tonight.

/Lukas

  parent reply	other threads:[~2008-07-10 22:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10 21:41 [PATCH] git-mailinfo: Fix getting the subject from the body Lukas Sandström
     [not found] ` <7vod55o0tx.fsf@gitster.siamese.dyndns.org>
2008-07-10 22:37   ` Lukas Sandström [this message]
2008-07-10 23:25     ` Junio C Hamano
2008-07-10 23:41       ` [PATCH] Add some useful functions for strbuf manipulation Lukas Sandström
2008-07-10 23:43         ` [PATCH/RFC] git-mailinfo: use strbuf's instead of fixed buffers Lukas Sandström
2008-07-12  6:10           ` Junio C Hamano
2008-07-13 18:17             ` ! " Lukas Sandström
2008-07-13 18:28               ` [PATCH] Make some strbuf_*() struct strbuf arguments const Lukas Sandström
2008-07-13 18:29                 ` [PATCH] Add some useful functions for strbuf manipulation Lukas Sandström
2008-07-13 18:30                   ` [PATCH] git-mailinfo: use strbuf's instead of fixed buffers Lukas Sandström
2008-07-13 21:37                     ` Junio C Hamano
2008-07-12  9:36 ` [PATCH] git-mailinfo: Fix getting the subject from the body Junio C Hamano
2008-07-12 21:45   ` Lukas Sandström
2008-07-15  3:13   ` Don Zickus

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=48768F30.8070409@etek.chalmers.se \
    --to=lukass@etek$(echo .)chalmers.se \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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