summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 402461a)
raw | patch | inline | side by side (parent: 402461a)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 16 Apr 2006 21:24:56 +0000 (14:24 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 16 Apr 2006 21:24:56 +0000 (14:24 -0700) |
Noticed by Yann Dirson.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
commit.c | patch | blob | history |
diff --git a/commit.c b/commit.c
index ca25574500fe3c88d2cc2953b7dd019b3acab9e7..05c4c923faaa1b2ee0c48ebc4230657fbbab6077 100644 (file)
--- a/commit.c
+++ b/commit.c
if (buf[len-1] == '\n')
buf[--len] = 0;
if (buf[0] == '#')
- return 0;
+ return NULL;
if ((len + 1) % 41) {
bad_graft_data:
error("bad graft data: %s", buf);
/* The format is just "Commit Parent1 Parent2 ...\n" */
int len = strlen(buf);
struct commit_graft *graft = read_graft_line(buf, len);
+ if (!graft)
+ continue;
if (register_commit_graft(graft, 1))
error("duplicate graft data: %s", buf);
}