New features: * Support Ogg Speex, Ogg FLAC, Ogg Midi * Intro file support * On-demand relays * Improved mount-level settings * URL listener authenticator * Authentication for on-demand files * Updated admin/web interface * Various reliability bug fixes Port changes: * Ogg Theora streaming is now enabled * Revamped README.OpenBSD file, tightened DESCR * <fileserve> directive not disabled any longer in icecast.xml.dist
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
$OpenBSD: patch-src_yp_c,v 1.3 2005/10/21 15:59:54 naddy Exp $
|
|
--- src/yp.c.orig Tue Aug 23 11:58:42 2005
|
|
+++ src/yp.c Tue Aug 23 12:10:43 2005
|
|
@@ -398,6 +398,7 @@ static unsigned do_yp_touch (ypdata_t *y
|
|
if (artist || title)
|
|
{
|
|
char *song;
|
|
+ size_t songlen;
|
|
char *separator = " - ";
|
|
if (artist == NULL)
|
|
{
|
|
@@ -405,10 +406,13 @@ static unsigned do_yp_touch (ypdata_t *y
|
|
separator = "";
|
|
}
|
|
if (title == NULL) title = strdup("");
|
|
- song = malloc (strlen (artist) + strlen (title) + strlen (separator) +1);
|
|
+ songlen = strlen(artist) + strlen(title) + strlen(separator) + 1;
|
|
+ song = malloc(songlen);
|
|
if (song)
|
|
{
|
|
- sprintf (song, "%s%s%s", artist, separator, title);
|
|
+ ret = snprintf (song, len, "%s%s%s", artist, separator, title);
|
|
+ if (ret == -1 || ret >= (signed)songlen)
|
|
+ ERROR0 ("snprintf() in do_yp_touch()");
|
|
add_yp_info(yp, song, YP_CURRENT_SONG);
|
|
stats_event (yp->mount, "yp_currently_playing", song);
|
|
free (song);
|