openbsd-ports/audio/sox/patches/patch-src_misc_c
naddy ffbb62be15 * make sox work on platforms where char defaults to unsigned
* sprintf -> snprintf, and opportunistically get rid of some strcpy()s

From: Matthias Kilian <kili@outback.escape.de>
2005-07-02 16:27:56 +00:00

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));