summaryrefslogtreecommitdiff
path: root/t/t0004-unwritable.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-02-22 17:44:54 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-22 14:51:09 -0800
commit62f17513e7113b7139e925df76d37f3d7df6b38c (patch)
treee4157ff4d03cb5cf85c3964a9b105ce923e0e9cd /t/t0004-unwritable.sh
parentfetch-pack: simplify add_sought_entry (diff)
downloadtgif-62f17513e7113b7139e925df76d37f3d7df6b38c.tar.xz
test-path-utils: fix normalize_path_copy output buffer size
The normalize_path_copy function needs an output buffer that is at least as long as its input (it may shrink the path, but never expand it). However, this test program feeds it static PATH_MAX-sized buffers, which have no relation to the input size. In the normalize_ceiling_entry case, we do at least check the size against PATH_MAX and die(), but that case is even more convoluted. We normalize into a fixed-size buffer, free the original, and then replace it with a strdup'd copy of the result. But normalize_path_copy explicitly allows normalizing in-place, so we can simply do that. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0004-unwritable.sh')
0 files changed, 0 insertions, 0 deletions