diff options
author | 1996-09-15 22:43:50 +0000 | |
---|---|---|
committer | 1996-09-15 22:43:50 +0000 | |
commit | 41ed14591aae2535ae51a8ee3e616e6786a4c2d0 (patch) | |
tree | 1f39d5429c489ebdfcad162358c3cf9e5e1b3d1a | |
parent | sprintf -> snprintf paranoia (diff) | |
download | wireguard-openbsd-41ed14591aae2535ae51a8ee3e616e6786a4c2d0.tar.xz wireguard-openbsd-41ed14591aae2535ae51a8ee3e616e6786a4c2d0.zip |
sprintf -> snprintf paranoia
-rw-r--r-- | bin/sh/histedit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 39b202762a4..fdd5fd7c295 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: histedit.c,v 1.3 1996/08/02 12:41:08 deraadt Exp $ */ +/* $OpenBSD: histedit.c,v 1.4 1996/09/15 22:43:50 millert Exp $ */ /* $NetBSD: histedit.c,v 1.8 1995/05/11 21:29:12 christos Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: histedit.c,v 1.3 1996/08/02 12:41:08 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: histedit.c,v 1.4 1996/09/15 22:43:50 millert Exp $"; #endif #endif /* not lint */ @@ -327,7 +327,7 @@ histcmd(argc, argv) if (editor) { int fd; INTOFF; /* easier */ - sprintf(editfile, "%s/_shXXXXXX", _PATH_TMP); + snprintf(editfile, sizeof(editfile), "%s/_shXXXXXX", _PATH_TMP); if ((fd = mkstemp(editfile)) < 0) error("can't create temporary file %s", editfile); if ((efp = fdopen(fd, "w")) == NULL) { |