author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sat, 17 Jan 2009 15:36:26 +0000 (16:36 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 18 Jan 2009 02:19:35 +0000 (18:19 -0800) | ||
commit | 20642801e44a03362d1809644bf4da6473636529 | |
tree | 9f24b9f62d3c82ad44926d03f779620791d48de0 | tree | snapshot |
parent | ebb7bbf769e3785e882dffcce69816b88e0838f5 | commit | diff |
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>
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 | diff | blob | history |