From ba586594207daf9b8fd7f864f741f566b75c3d1b Mon Sep 17 00:00:00 2001 From: antma Date: Tue, 14 Jan 2014 14:46:13 +0400 Subject: [PATCH] fix sending a lot of spaces in version string --- queries.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/queries.c b/queries.c index de0232b..76fcde9 100644 --- a/queries.c +++ b/queries.c @@ -315,8 +315,8 @@ void do_insert_header (void) { struct utsname st; uname (&st); out_string (st.machine); - static char buf[65536]; - tsnprintf (buf, 65535, "%999s %999s %999s", st.sysname, st.release, st.version); + static char buf[4096]; + tsnprintf (buf, sizeof (buf), "%.999s %.999s %.999s\n", st.sysname, st.release, st.version); out_string (buf); out_string (TG_VERSION " (build " TG_BUILD ")"); out_string ("En");