Re: [PATCH] git-mailinfo: Fix getting the subject from the body

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> Lukas Sandström <lukass@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx>
>> ---
>>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux