summaryrefslogtreecommitdiff
path: root/bin/csh
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-15 22:00:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-15 22:00:28 +0000
commitecc60413067be65a5816bbc9c21e9e389b2d6fac (patch)
tree272b02ba57e2b1943ef253a77b99af11a4c0827a /bin/csh
parent570291a686117b4e78c97d649bd97298a5ef6c1f (diff)
fix a typo and vsprintf -> vsnprintf paranoia
Diffstat (limited to 'bin/csh')
-rw-r--r--bin/csh/err.c6
-rw-r--r--bin/csh/printf.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/csh/err.c b/bin/csh/err.c
index 278cc8e3aab..00c77a85848 100644
--- a/bin/csh/err.c
+++ b/bin/csh/err.c
@@ -1,4 +1,4 @@
-/* $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 $ */
/*-
@@ -38,7 +38,7 @@
#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 */
@@ -312,7 +312,7 @@ seterror(id, va_alist)
#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);
diff --git a/bin/csh/printf.c b/bin/csh/printf.c
index 80a4871b472..a44269b597a 100644
--- a/bin/csh/printf.c
+++ b/bin/csh/printf.c
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -46,7 +46,7 @@ static char copyright[] =
#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 */
@@ -71,7 +71,7 @@ static char rcsid[] = "$OpenBSD: printf.c,v 1.3 1996/08/02 12:40:52 deraadt Exp
#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"