Re: [PATCHv2 1/2] builtin/commit.c: drop use snprintf via dynamic allocation

2017-01-11 Thread Junio C Hamano
Elia Pinto writes: > In general snprintf is bad because it may silently truncate results if we're > wrong. In this patch where we use PATH_MAX, we'd want to handle larger > paths anyway, so we switch to dynamic allocation. > > Helped-by: Jeff King > Signed-off-by: Elia Pinto > --- > This is the

[PATCHv2 1/2] builtin/commit.c: drop use snprintf via dynamic allocation

2017-01-10 Thread Elia Pinto
In general snprintf is bad because it may silently truncate results if we're wrong. In this patch where we use PATH_MAX, we'd want to handle larger paths anyway, so we switch to dynamic allocation. Helped-by: Jeff King Signed-off-by: Elia Pinto --- This is the second version of the patch. I hav