Re: [PATCH] builtin/commit.c: convert trivial snprintf calls to xsnprintf

2016-12-13 Thread Jeff King
On Tue, Dec 13, 2016 at 11:03:53AM -0800, Junio C Hamano wrote: > >> @@ -1525,12 +1526,10 @@ static int git_commit_config(const char *k, const > >> char *v, void *cb) > >> static int run_rewrite_hook(const unsigned char *oldsha1, > >>const unsigned char *newsha1) > >> {

Re: [PATCH] builtin/commit.c: convert trivial snprintf calls to xsnprintf

2016-12-13 Thread Junio C Hamano
Jeff King writes: >> +argv_array_pushf(&env, "GIT_INDEX_FILE=%s", index_file); >> +if (launch_editor(git_path_commit_editmsg(), NULL, env.argv)) { >> fprintf(stderr, >> _("Please supply the message using either -m or -F >> option.

Re: [PATCH] builtin/commit.c: convert trivial snprintf calls to xsnprintf

2016-12-13 Thread Jeff King
On Tue, Dec 13, 2016 at 01:27:17PM +, Elia Pinto wrote: > With the commits f2f02675 and 5096d490 we have been converted in some files > the call from snprintf/sprintf/strcpy to xsnprintf. This patch supersedes the > snprintf with several calls that make use of the heap rather than fixed > le

[PATCH] builtin/commit.c: convert trivial snprintf calls to xsnprintf

2016-12-13 Thread Elia Pinto
With the commits f2f02675 and 5096d490 we have been converted in some files the call from snprintf/sprintf/strcpy to xsnprintf. This patch supersedes the snprintf with several calls that make use of the heap rather than fixed length buffers (eg. PATH_MAX) that may be incorrect on some systems. S