Skip to content

Commit 389d176

Browse files
spearcegitster
authored andcommitted
Increase the size of the die/warning buffer to avoid truncation
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>
1 parent b0de555 commit 389d176

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

usage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
static void report(const char *prefix, const char *err, va_list params)
99
{
10-
char msg[256];
10+
char msg[1024];
1111
vsnprintf(msg, sizeof(msg), err, params);
1212
fprintf(stderr, "%s%s\n", prefix, msg);
1313
}

0 commit comments

Comments
 (0)