]> git.ipfire.org Git - thirdparty/git.git/commit
apply: avoid using fixed-size buffer in write_out_one_reject()
authorRené Scharfe <l.s.r@web.de>
Tue, 16 Apr 2024 20:16:05 +0000 (22:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Apr 2024 20:38:35 +0000 (13:38 -0700)
commit20fee9af9e511a9086aa02992bd27035b914ee14
tree0eff543690e73a8c01534ac4bebc13b0d0d2e820
parent548fe35913139eba2981be718f7b4dff7d0412d5
apply: avoid using fixed-size buffer in write_out_one_reject()

On some systems PATH_MAX is not a hard limit.  Support longer paths by
building them on the heap instead of using static buffers.

Take care to work around (arguably buggy) implementations of free(3)
that change errno by calling it only after using the errno value.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c