mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
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>
This commit is contained in:
parent
aa9c55b667
commit
c829774c30
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue