Fix reflog parsing for a malformed branch switching entry

target can be NULL when we failed to parse the message.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Junio C Hamano 2009-01-19 16:44:08 -08:00
parent aa9c55b667
commit c829774c30
1 changed files with 1 additions and 1 deletions

View File

@ -727,7 +727,7 @@ static int grab_nth_branch_switch(unsigned char *osha1, unsigned char *nsha1,
target += 4;
}

if (!match)
if (!match || !target)
return 0;

len = target - match - 4;