openbsd-ports/audio/sox/patches/patch-src_sndrtool_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

14 lines
529 B
Plaintext

$OpenBSD: patch-src_sndrtool_c,v 1.1 2005/07/02 16:27:56 naddy Exp $
--- src/sndrtool.c.orig Tue Sep 28 04:33:09 2004
+++ src/sndrtool.c Fri Jun 24 11:48:21 2005
@@ -252,7 +252,8 @@ static void sndtwriteheader(ft_t ft, st_
st_writew (ft,10);
st_writew (ft,4);
memset (name_buf, 0, 96);
- sprintf (name_buf,"%.62s - File created by Sound Exchange",ft->filename);
+ snprintf (name_buf, sizeof(name_buf),
+ "%.62s - File created by Sound Exchange", ft->filename);
st_write(ft, name_buf, 1, 96);
}