summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa9c55b)
raw | patch | inline | side by side (parent: aa9c55b)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Jan 2009 00:44:08 +0000 (16:44 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Jan 2009 00:44:17 +0000 (16:44 -0800) |
target can be NULL when we failed to parse the message.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c | patch | blob | history |
diff --git a/sha1_name.c b/sha1_name.c
index 9d544a26332d14998bdcae0474bb66f1f542a4b4..f54b6cb36a0a67f6319d3ff56e92bbac55ecd639 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
target += 4;
}
- if (!match)
+ if (!match || !target)
return 0;
len = target - match - 4;