Code

http-push: fix off-by-path_len
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Sat, 17 Jan 2009 15:36:26 +0000 (16:36 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 18 Jan 2009 02:19:35 +0000 (18:19 -0800)
commit20642801e44a03362d1809644bf4da6473636529
tree9f24b9f62d3c82ad44926d03f779620791d48de0
parentebb7bbf769e3785e882dffcce69816b88e0838f5
http-push: fix off-by-path_len

When getting the result of remote_ls(), we were advancing the variable
"path" to the relative path inside the repository.

However, then we went on to malloc a bogus amount of memory: we were
subtracting the prefix length _again_, quite possibly getting something
negative, which xmalloc() interprets as really, really much.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c