68a1a6828b
Submitted by Peter Stromberg <home@wilfried.net>. Sound Server for Window Maker.
26 lines
736 B
Plaintext
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);
|