From 0e1a7f3845c53c459f61d3b9f41f086053cc88c2 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sun, 25 Jul 2004 17:06:03 +0000 Subject: do not fill up to the max when you intend to strcat() another character later CVS patchset: 6845 CVS date: 2004/07/25 17:06:03 --- misc/cdda_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/cdda_server.c') diff --git a/misc/cdda_server.c b/misc/cdda_server.c index 96dc57842..d054f23be 100644 --- a/misc/cdda_server.c +++ b/misc/cdda_server.c @@ -312,7 +312,7 @@ int sock_string_write(int socket, char *msg, ...) { va_list args; va_start(args, msg); - vsnprintf(buf, _BUFSIZ, msg, args); + vsnprintf(buf, _BUFSIZ - 1, msg, args); va_end(args); /* Each line sent is '\n' terminated */ -- cgit v1.2.3