3f0fe7b
diff -Nur audacious-plugins-2.2-orig/src/streambrowser/streambrowser.c audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.c
3f0fe7b
--- audacious-plugins-2.2-orig/src/streambrowser/streambrowser.c	2009-11-22 23:49:53.000000000 +0100
fc5e1ab
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.c	2010-02-06 19:35:33.000000000 +0100
fc5e1ab
@@ -611,16 +611,20 @@
3f0fe7b
 {
3f0fe7b
         gint playlist = aud_playlist_get_active();
3f0fe7b
         gint entrycount = aud_playlist_entry_count(playlist);
fc5e1ab
+    gchar * unix_name = g_build_filename (audacious_get_localdir (),
fc5e1ab
+     PLAYLIST_TEMP_FILE, NULL);
fc5e1ab
+    gchar * uri_name = g_filename_to_uri (unix_name, NULL, NULL);
3f0fe7b
 
3f0fe7b
         if (strlen(streaminfo->playlist_url) > 0) {
3f0fe7b
 		debug("fetching stream playlist for station '%s' from '%s'\n", streaminfo->name, streaminfo->playlist_url);
3f0fe7b
-		if (!fetch_remote_to_local_file(streaminfo->playlist_url, PLAYLIST_TEMP_FILE)) {
3f0fe7b
-		    failure("shoutcast: stream playlist '%s' could not be downloaded to '%s'\n", streaminfo->playlist_url, PLAYLIST_TEMP_FILE);
fc5e1ab
-		    return;
fc5e1ab
+		if (!fetch_remote_to_local_file(streaminfo->playlist_url, uri_name)) {
fc5e1ab
+            failure ("shoutcast: stream playlist '%s' could not be downloaded "
fc5e1ab
+             "to '%s'\n", streaminfo->playlist_url, uri_name);
fc5e1ab
+            goto DONE;
3f0fe7b
 		}
3f0fe7b
-		debug("stream playlist '%s' successfuly downloaded to '%s'\n", streaminfo->playlist_url, PLAYLIST_TEMP_FILE);
fc5e1ab
+		debug("stream playlist '%s' successfuly downloaded to '%s'\n", streaminfo->playlist_url, uri_name);
3f0fe7b
 
3f0fe7b
-	   	aud_playlist_insert_playlist(aud_playlist_get_active(), entrycount, PLAYLIST_TEMP_FILE);
fc5e1ab
+	   	aud_playlist_insert_playlist(aud_playlist_get_active(), entrycount, uri_name);
3f0fe7b
 		debug("stream playlist '%s' added\n", streaminfo->playlist_url);
3f0fe7b
 	}
3f0fe7b
 
fc5e1ab
@@ -628,6 +632,10 @@
3f0fe7b
 		aud_playlist_insert_playlist(aud_playlist_get_active(), entrycount, streaminfo->url);
fc5e1ab
 		debug("stream '%s' added\n", streaminfo->url);
fc5e1ab
 	}
fc5e1ab
+
fc5e1ab
+DONE:
fc5e1ab
+    g_free (unix_name);
fc5e1ab
+    g_free (uri_name);
fc5e1ab
 }
fc5e1ab
 
fc5e1ab
 static void on_plugin_services_menu_item_click()
3f0fe7b
diff -Nur audacious-plugins-2.2-orig/src/streambrowser/streambrowser.h audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.h
3f0fe7b
--- audacious-plugins-2.2-orig/src/streambrowser/streambrowser.h	2009-11-22 23:49:53.000000000 +0100
fc5e1ab
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/streambrowser.h	2010-02-06 19:29:11.000000000 +0100
fc5e1ab
@@ -23,7 +23,7 @@
3f0fe7b
 #define DEF_STRING_LEN				1024
3f0fe7b
 #define DEF_BUFFER_SIZE				512
3f0fe7b
 #define MAX_UPDATE_THREADS			4
3f0fe7b
-#define PLAYLIST_TEMP_FILE			"file:///tmp/playlist.pls"
fc5e1ab
+#define PLAYLIST_TEMP_FILE			"streambrowser-playlist-temp.pls"
3f0fe7b
 #define STREAMBROWSER_ICON_SMALL	DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "streambrowser-16x16.png"
3f0fe7b
 #define STREAMBROWSER_ICON			DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "streambrowser-64x64.png"
3f0fe7b
 
3f0fe7b
diff -Nur audacious-plugins-2.2-orig/src/streambrowser/xiph.c audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.c
3f0fe7b
--- audacious-plugins-2.2-orig/src/streambrowser/xiph.c	2009-11-22 23:49:53.000000000 +0100
fc5e1ab
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.c	2010-02-06 19:37:53.000000000 +0100
fc5e1ab
@@ -162,6 +162,10 @@
3f0fe7b
 
3f0fe7b
 static void refresh_streamdir(void)
3f0fe7b
 {
fc5e1ab
+    gchar * unix_name = g_build_filename (audacious_get_localdir (),
fc5e1ab
+     XIPH_TEMP_FILENAME, NULL);
fc5e1ab
+    gchar * uri_name = g_filename_to_uri (unix_name, NULL, NULL);
3f0fe7b
+
3f0fe7b
 	/* free any previously fetched streamdir data */
3f0fe7b
 	if (xiph_entries != NULL) {
3f0fe7b
 		free(xiph_entries);
fc5e1ab
@@ -170,16 +174,18 @@
3f0fe7b
 	xiph_entry_count = 0;
3f0fe7b
 
3f0fe7b
 	debug("xiph: fetching streaming directory file '%s'\n", XIPH_STREAMDIR_URL);
3f0fe7b
-	if (!fetch_remote_to_local_file(XIPH_STREAMDIR_URL, XIPH_TEMP_FILENAME)) {
3f0fe7b
-		failure("xiph: stream directory file '%s' could not be downloaded to '%s'\n", XIPH_STREAMDIR_URL, XIPH_TEMP_FILENAME);
fc5e1ab
-		return;
fc5e1ab
+
fc5e1ab
+    if (! fetch_remote_to_local_file (XIPH_STREAMDIR_URL, uri_name)) {
fc5e1ab
+        failure ("xiph: stream directory file '%s' could not be downloaded to "
fc5e1ab
+         "'%s'\n", XIPH_STREAMDIR_URL, uri_name);
fc5e1ab
+        goto DONE;
3f0fe7b
 	}
3f0fe7b
-	debug("xiph: stream directory file '%s' successfuly downloaded to '%s'\n", XIPH_STREAMDIR_URL, XIPH_TEMP_FILENAME);
fc5e1ab
+	debug("xiph: stream directory file '%s' successfuly downloaded to '%s'\n", XIPH_STREAMDIR_URL, uri_name);
3f0fe7b
 
3f0fe7b
-	xmlDoc *doc = xmlReadFile(XIPH_TEMP_FILENAME, NULL, 0);
fc5e1ab
+	xmlDoc *doc = xmlReadFile(uri_name, NULL, 0);
3f0fe7b
 	if (doc == NULL) {
3f0fe7b
 		failure("xiph: failed to read stream directory file\n");
fc5e1ab
-		return;
fc5e1ab
+		goto DONE;
fc5e1ab
 	}
fc5e1ab
 	
fc5e1ab
 	xmlNode *root_node = xmlDocGetRootElement(doc);
fc5e1ab
@@ -222,6 +228,10 @@
fc5e1ab
 	xmlFreeDoc(doc);
fc5e1ab
 	
fc5e1ab
 	debug("xiph: streaming directory successfuly loaded\n");
fc5e1ab
+
fc5e1ab
+DONE:
fc5e1ab
+    g_free (unix_name);
fc5e1ab
+    g_free (uri_name);
fc5e1ab
 }
fc5e1ab
 
fc5e1ab
 static gboolean genre_match(gchar *string1, gchar *string2)
3f0fe7b
diff -Nur audacious-plugins-2.2-orig/src/streambrowser/xiph.h audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.h
3f0fe7b
--- audacious-plugins-2.2-orig/src/streambrowser/xiph.h	2009-11-22 23:49:53.000000000 +0100
fc5e1ab
+++ audacious-plugins-2.2-tmp-vuln/src/streambrowser/xiph.h	2010-02-06 19:29:26.000000000 +0100
fc5e1ab
@@ -26,7 +26,7 @@
3f0fe7b
 #define XIPH_NAME				"Xiph"
3f0fe7b
 #define XIPH_ICON				DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "xiph.png"
3f0fe7b
 #define XIPH_STREAMDIR_URL		"http://dir.xiph.org/yp.xml"
3f0fe7b
-#define XIPH_TEMP_FILENAME		"file:///tmp/xiph_yp.xml"
fc5e1ab
+#define XIPH_TEMP_FILENAME		"streambrowser-xiph-temp.xml"
3f0fe7b
 
3f0fe7b
 
3f0fe7b
 gboolean							xiph_streaminfo_fetch(category_t *category, streaminfo_t *streaminfo);