mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
builtin-fetch--tool: make sure not to overstep ls-remote-result buffer.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
dec56c8cf1
commit
c7d68c8000
|
@ -407,6 +407,8 @@ static int expand_refs_wildcard(const char *ls_remote_result, int numrefs,
|
|||
eol = !next ? (ls + strlen(ls)) : next;
|
||||
if (!memcmp("^{}", eol-3, 3))
|
||||
continue;
|
||||
if (eol - ls < 40)
|
||||
continue;
|
||||
if (get_sha1_hex(ls, sha1))
|
||||
continue;
|
||||
ls += 40;
|
||||
|
|
Loading…
Reference in a new issue