Re: [PATCH] Prevent buffer overflows when path is too long

2013-11-29 Thread Antoine Pelisse
On Tue, Nov 26, 2013 at 8:50 PM, Junio C Hamano gits...@pobox.com wrote: Antoine Pelisse apeli...@gmail.com writes: Some buffers created with PATH_MAX length are not checked when being written, and can overflow if PATH_MAX is not big enough to hold the path. Perhaps it is time to update all

[PATCH] Prevent buffer overflows when path is too long

2013-11-26 Thread Antoine Pelisse
Some buffers created with PATH_MAX length are not checked when being written, and can overflow if PATH_MAX is not big enough to hold the path. Some of the use-case are probably impossible to reach, and the program dies if the path looks too long. When it would be possible for the user to use a

Re: [PATCH] Prevent buffer overflows when path is too long

2013-11-26 Thread Junio C Hamano
Antoine Pelisse apeli...@gmail.com writes: Some buffers created with PATH_MAX length are not checked when being written, and can overflow if PATH_MAX is not big enough to hold the path. Perhaps it is time to update all of them to use strbuf? The callers of prefix_filename() aren't that many,