From e1c750ad7ff554091af0addb8e21c7be3a0e48bb Mon Sep 17 00:00:00 2001 From: antma Date: Fri, 10 Jan 2014 15:59:48 +0400 Subject: [PATCH] add length modifier to the format for strings in sprintf call --- queries.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/queries.c b/queries.c index 72d6962..5856f36 100644 --- a/queries.c +++ b/queries.c @@ -321,8 +321,8 @@ void do_insert_header (void) { struct utsname st; uname (&st); out_string (st.machine); - static char buf[1000000]; - sprintf (buf, "%s %s %s", st.sysname, st.release, st.version); + static char buf[65536]; + sprintf (buf, "%999s %999s %999s", st.sysname, st.release, st.version); out_string (buf); out_string (TG_VERSION " (build " TG_BUILD ")"); out_string ("En");