ffbb62be15
* sprintf -> snprintf, and opportunistically get rid of some strcpy()s From: Matthias Kilian <kili@outback.escape.de>
15 lines
480 B
Plaintext
15 lines
480 B
Plaintext
$OpenBSD: patch-src_util_c,v 1.1 2005/07/02 16:27:56 naddy Exp $
|
|
--- src/util.c.orig Wed Sep 8 00:25:24 2004
|
|
+++ src/util.c Fri Jun 24 10:45:22 2005
|
|
@@ -88,9 +88,8 @@ void st_fail_errno(ft_t ft, int st_errno
|
|
ft->st_errno = st_errno;
|
|
|
|
va_start(args, fmt);
|
|
- vsprintf(ft->st_errstr, fmt, args);
|
|
+ vsnprintf(ft->st_errstr, sizeof(ft->st_errstr), fmt, args);
|
|
va_end(args);
|
|
- ft->st_errstr[255] = '\0';
|
|
}
|
|
|
|
int st_is_bigendian(void)
|