openbsd-ports/audio/wsoundserver/patches/patch-wslib_error_c
naddy 68a1a6828b Import wsoundserver-0.4.0.
Submitted by Peter Stromberg <home@wilfried.net>.

Sound Server for Window Maker.
2001-01-09 20:59:34 +00:00

26 lines
736 B
Plaintext

$OpenBSD: patch-wslib_error_c,v 1.1.1.1 2001/01/09 20:59:35 naddy Exp $
--- wslib/error.c.orig Fri Mar 31 22:10:25 2000
+++ wslib/error.c Tue Jan 9 20:59:01 2001
@@ -54,8 +54,8 @@ sfatal(const char* msg, ...)
va_start(args, msg);
- vsprintf(buf, msg, args);
- strcat(buf,"\n");
+ vsnprintf(buf, sizeof(buf)-1, msg, args);
+ strlcat(buf,"\n", sizeof(buf));
fflush(stdout);
fputs(_wslib_progname, stderr);
fputs(" fatal error: ",stderr);
@@ -75,8 +75,8 @@ swarning(const char *msg, ...)
va_start(args, msg);
- vsprintf(buf, msg, args);
- strcat(buf,"\n");
+ vsnprintf(buf, sizeof(buf)-1, msg, args);
+ strlcat(buf,"\n", sizeof(buf));
fflush(stdout);
fputs(_wslib_progname, stderr);
fputs(" warning: ",stderr);