Code

Increase the size of the die/warning buffer to avoid truncation
authorShawn O. Pearce <spearce@spearce.org>
Tue, 24 Mar 2009 23:10:35 +0000 (16:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Mar 2009 23:58:20 +0000 (16:58 -0700)
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>
usage.c

diff --git a/usage.c b/usage.c
index 24f5fc00c2501c1a1cc317f0b74b458ea50c8b0e..820d09f92b03b6cc96fbe9a954c37fd2d5e5a417 100644 (file)
--- a/usage.c
+++ b/usage.c
@@ -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);
 }