vsprintf -> vnsprintf paranoia.

Obtained from:	Todd Miller <millert@openbsd.org> (OpenBSD rev 1.3)
This commit is contained in:
Eivind Eklund 1997-10-07 16:33:22 +00:00
parent 13a71f5d9b
commit ea3a01d31d

View File

@ -36,7 +36,7 @@
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
"$Id: err.c,v 1.4 1997/02/22 14:01:48 peter Exp $";
"$Id: err.c,v 1.5 1997/08/07 21:42:06 steve Exp $";
#endif
#endif /* not lint */
@ -310,7 +310,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);