-/* $OpenBSD: err.c,v 1.2 1996/06/23 14:19:19 deraadt Exp $ */
+/* $OpenBSD: err.c,v 1.3 1996/09/15 22:00:27 millert Exp $ */
/* $NetBSD: err.c,v 1.6 1995/03/21 09:02:47 cgd Exp $ */
/*-
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: err.c,v 1.2 1996/06/23 14:19:19 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: err.c,v 1.3 1996/09/15 22:00:27 millert Exp $";
#endif
#endif /* not lint */
#endif
if (id < 0 || id > sizeof(errorlist) / sizeof(errorlist[0]))
id = ERR_INVALID;
- vsprintf(berr, errorlist[id], va);
+ vsnprintf(berr, sizeof(berr), errorlist[id], va);
va_end(va);
seterr = strsave(berr);
-/* $OpenBSD: printf.c,v 1.3 1996/08/02 12:40:52 deraadt Exp $ */
+/* $OpenBSD: printf.c,v 1.4 1996/09/15 22:00:26 millert Exp $ */
/* $NetBSD: printf.c,v 1.6 1995/03/21 09:03:15 cgd Exp $ */
/*
#if 0
static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93";
#else
-static char rcsid[] = "$OpenBSD: printf.c,v 1.3 1996/08/02 12:40:52 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: printf.c,v 1.4 1996/09/15 22:00:26 millert Exp $";
#endif
#endif /* not lint */
#define main printfcmd
#define warnx(a, b, c) { \
char buf[64]; \
- (void)sprintf(buf, sizeof(buf), a, b, c); \
+ (void)snprintf(buf, sizeof(buf), a, b, c); \
error(buf); \
}
#include "../../bin/sh/bltin/bltin.h"