ffbb62be15
* sprintf -> snprintf, and opportunistically get rid of some strcpy()s From: Matthias Kilian <kili@outback.escape.de>
13 lines
497 B
Plaintext
13 lines
497 B
Plaintext
$OpenBSD: patch-src_misc_c,v 1.1 2005/07/02 16:27:56 naddy Exp $
|
|
--- src/misc.c.orig Thu Sep 30 04:42:10 2004
|
|
+++ src/misc.c Fri Jun 24 10:51:16 2005
|
|
@@ -467,7 +467,7 @@ const char *st_version()
|
|
{
|
|
static char versionstr[20];
|
|
|
|
- sprintf(versionstr, "Version %d.%d.%d",
|
|
+ snprintf(versionstr, sizeof(versionstr), "Version %d.%d.%d",
|
|
(ST_LIB_VERSION_CODE & 0xff0000) >> 16,
|
|
(ST_LIB_VERSION_CODE & 0x00ff00) >> 8,
|
|
(ST_LIB_VERSION_CODE & 0x0000ff));
|