entry.c: fix possible buffer overflow in remove_subtree()
commit2f29e0c6fa5d312c4e0675b0dd23d3126b9f55fa
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 13 Mar 2014 09:19:08 +0000 (13 10:19 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Mar 2014 17:57:48 +0000 (13 10:57 -0700)
tree9fdd08d73367ffe80b4d0f403ee8c42d65115d53
parentf63272a35e03a9895c468d1a698dabaa4c3d9273
entry.c: fix possible buffer overflow in remove_subtree()

remove_subtree() manipulated path in a fixed-size buffer even though
the length of the input, let alone the length of entries within the
directory, were not known in advance.  Change the function to take a
strbuf argument and use that object as its scratch space.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
entry.c