Re: [PATCH] daemon: detect and reject too-long paths

2016-10-22 Thread Junio C Hamano
Jeff King writes: > When we are checking the path via path_ok(), we use some > fixed PATH_MAX buffers. We write into them via snprintf(), > so there's no possibility of overflow, but it does mean we > may silently truncate the path, leading to potentially > confusing errors when the partial path

Re: [PATCH] daemon: detect and reject too-long paths

2016-10-21 Thread Jeff King
On Sat, Oct 22, 2016 at 12:59:38AM -0400, Jeff King wrote: > When we are checking the path via path_ok(), we use some > fixed PATH_MAX buffers. We write into them via snprintf(), > so there's no possibility of overflow, but it does mean we > may silently truncate the path, leading to potentially >

[PATCH] daemon: detect and reject too-long paths

2016-10-21 Thread Jeff King
When we are checking the path via path_ok(), we use some fixed PATH_MAX buffers. We write into them via snprintf(), so there's no possibility of overflow, but it does mean we may silently truncate the path, leading to potentially confusing errors when the partial path does not exist. We're better