Skip to content

Commit

Permalink
Increase the size of the die/warning buffer to avoid truncation
Browse files Browse the repository at this point in the history
Long messages like those from lockfile.c when a lock can't be
obtained truncate with only 256 bytes in the message buffer.
Bump it to 1024 to give more space for these longer cases.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Mar 24, 2009
1 parent b0de555 commit 389d176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

static void report(const char *prefix, const char *err, va_list params)
{
char msg[256];
char msg[1024];
vsnprintf(msg, sizeof(msg), err, params);
fprintf(stderr, "%s%s\n", prefix, msg);
}
Expand Down

0 comments on commit 389d176

Please sign in to comment.