commit | c7d68c80002090bddc1eb740d83818aa0a08bbbe | [log] [tgz] |
---|---|---|
author | Junio C Hamano <junkio@cox.net> | Tue Feb 27 23:51:48 2007 -0800 |
committer | Junio C Hamano <junkio@cox.net> | Tue Feb 27 23:51:48 2007 -0800 |
tree | 72341efe1f82e4cabbe0c56bb0cb03506231dc26 | |
parent | dec56c8cf1da06fe9ff4c9d3a26f74fb1ddd2fc6 [diff] |
builtin-fetch--tool: make sure not to overstep ls-remote-result buffer. Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c index 5301c3c..eeee0a5 100644 --- a/builtin-fetch--tool.c +++ b/builtin-fetch--tool.c
@@ -407,6 +407,8 @@ 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;