mirror of
https://github.com/git/git.git
synced 2026-02-18 21:59:08 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user