diff -Nur audacious-plugins-2.2-orig/src/streambrowser/streambrowser.c audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.c
--- audacious-plugins-2.2-orig/src/streambrowser/streambrowser.c 2009-11-22 23:49:53.000000000 +0100
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.c 2010-02-05 20:44:34.000000000 +0100
@@ -611,18 +611,21 @@
{
gint playlist = aud_playlist_get_active();
gint entrycount = aud_playlist_entry_count(playlist);
+ gchar* tempname = g_strconcat( "file://", g_build_filename(audacious_get_localdir(), "streambrowser-tmp-playlist.pls", NULL) );
if (strlen(streaminfo->playlist_url) > 0) {
debug("fetching stream playlist for station '%s' from '%s'\n", streaminfo->name, streaminfo->playlist_url);
- if (!fetch_remote_to_local_file(streaminfo->playlist_url, PLAYLIST_TEMP_FILE)) {
- failure("shoutcast: stream playlist '%s' could not be downloaded to '%s'\n", streaminfo->playlist_url, PLAYLIST_TEMP_FILE);
+ if (!fetch_remote_to_local_file(streaminfo->playlist_url, tempname)) {
+ failure("shoutcast: stream playlist '%s' could not be downloaded to '%s'\n", streaminfo->playlist_url, tempname);
+ g_free(tempname);
return;
}
- debug("stream playlist '%s' successfuly downloaded to '%s'\n", streaminfo->playlist_url, PLAYLIST_TEMP_FILE);
+ debug("stream playlist '%s' successfuly downloaded to '%s'\n", streaminfo->playlist_url, tempname);
- aud_playlist_insert_playlist(aud_playlist_get_active(), entrycount, PLAYLIST_TEMP_FILE);
+ aud_playlist_insert_playlist(aud_playlist_get_active(), entrycount, tempname);
debug("stream playlist '%s' added\n", streaminfo->playlist_url);
}
+ g_free(tempname);
if (strlen(streaminfo->url) > 0) {
aud_playlist_insert_playlist(aud_playlist_get_active(), entrycount, streaminfo->url);
diff -Nur audacious-plugins-2.2-orig/src/streambrowser/streambrowser.h audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.h
--- audacious-plugins-2.2-orig/src/streambrowser/streambrowser.h 2009-11-22 23:49:53.000000000 +0100
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.h 2010-02-05 20:43:50.000000000 +0100
@@ -23,7 +23,6 @@
#define DEF_STRING_LEN 1024
#define DEF_BUFFER_SIZE 512
#define MAX_UPDATE_THREADS 4
-#define PLAYLIST_TEMP_FILE "file:///tmp/playlist.pls"
#define STREAMBROWSER_ICON_SMALL DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "streambrowser-16x16.png"
#define STREAMBROWSER_ICON DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "streambrowser-64x64.png"
diff -Nur audacious-plugins-2.2-orig/src/streambrowser/xiph.c audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.c
--- audacious-plugins-2.2-orig/src/streambrowser/xiph.c 2009-11-22 23:49:53.000000000 +0100
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.c 2010-02-05 20:43:41.000000000 +0100
@@ -162,6 +162,8 @@
static void refresh_streamdir(void)
{
+ gchar* tempname = g_strconcat( "file://", g_build_filename(audacious_get_localdir(), "streambrowser-tmp-xiph_yp.xml", NULL) );
+
/* free any previously fetched streamdir data */
if (xiph_entries != NULL) {
free(xiph_entries);
@@ -170,13 +172,15 @@
xiph_entry_count = 0;
debug("xiph: fetching streaming directory file '%s'\n", XIPH_STREAMDIR_URL);
- if (!fetch_remote_to_local_file(XIPH_STREAMDIR_URL, XIPH_TEMP_FILENAME)) {
- failure("xiph: stream directory file '%s' could not be downloaded to '%s'\n", XIPH_STREAMDIR_URL, XIPH_TEMP_FILENAME);
+ if (!fetch_remote_to_local_file(XIPH_STREAMDIR_URL, tempname)) {
+ failure("xiph: stream directory file '%s' could not be downloaded to '%s'\n", XIPH_STREAMDIR_URL, tempname);
+ g_free(tempname);
return;
}
- debug("xiph: stream directory file '%s' successfuly downloaded to '%s'\n", XIPH_STREAMDIR_URL, XIPH_TEMP_FILENAME);
+ debug("xiph: stream directory file '%s' successfuly downloaded to '%s'\n", XIPH_STREAMDIR_URL, tempname);
- xmlDoc *doc = xmlReadFile(XIPH_TEMP_FILENAME, NULL, 0);
+ xmlDoc *doc = xmlReadFile(tempname, NULL, 0);
+ g_free(tempname);
if (doc == NULL) {
failure("xiph: failed to read stream directory file\n");
return;
diff -Nur audacious-plugins-2.2-orig/src/streambrowser/xiph.h audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.h
--- audacious-plugins-2.2-orig/src/streambrowser/xiph.h 2009-11-22 23:49:53.000000000 +0100
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.h 2010-02-05 20:42:47.000000000 +0100
@@ -26,7 +26,6 @@
#define XIPH_NAME "Xiph"
#define XIPH_ICON DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "xiph.png"
#define XIPH_STREAMDIR_URL "http://dir.xiph.org/yp.xml"
-#define XIPH_TEMP_FILENAME "file:///tmp/xiph_yp.xml"
gboolean xiph_streaminfo_fetch(category_t *category, streaminfo_t *streaminfo);