@matheusbsbs / matheus-bagliano / commits / c7d68c8000
Fork 0

builtin-fetch--tool: make sure not to overstep ls-remote-result buffer.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 27, 2007 at 23:51 UTC c7d68c80002090bddc1eb740d83818aa0a08bbbe
1 file changed +2
builtin-fetch--tool.c
+2
@@ -407,6 +407,8 @@ static int expand_refs_wildcard(const char *ls_remote_result, int numrefs,
407 eol = !next ? (ls + strlen(ls)) : next;
408 if (!memcmp("^{}", eol-3, 3))
409 continue;
410 + if (eol - ls < 40)
411 + continue;
412 if (get_sha1_hex(ls, sha1))
413 continue;
414 ls += 40;