git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-mailinfo: Fix getting the subject from the body
@ 2008-07-10 21:41 Lukas Sandström
       [not found] ` <7vod55o0tx.fsf@gitster.siamese.dyndns.org>
  2008-07-12  9:36 ` [PATCH] git-mailinfo: Fix getting the subject from the body Junio C Hamano
  0 siblings, 2 replies; 14+ messages in thread
From: Lukas Sandström @ 2008-07-10 21:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Lukas Sandström, Git Mailing List

"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.

 builtin-mailinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 962aa34..2d1520f 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -334,7 +334,7 @@ static int check_header(char *line, unsigned linesize, char **hdr_data, int over
 		return 1;
 	if (!memcmp("[PATCH]", line, 7) && isspace(line[7])) {
 		for (i = 0; header[i]; i++) {
-			if (!memcmp("Subject: ", header[i], 9)) {
+			if (!memcmp("Subject", header[i], 7)) {
 				if (! handle_header(line, hdr_data[i], 0)) {
 					return 1;
 				}
-- 
1.5.4.5

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-07-15  3:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).