[totem/gnome-2-26] Bug 579716 – totem-plugin-viewer crashed with SIGSEGV in strchr()



commit 03bc445255fd49cfb5e49d387782fbe79a0ac9c0
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Apr 22 14:31:31 2009 +0100

    Bug 579716 â?? totem-plugin-viewer crashed with SIGSEGV in strchr()
    
    2009-04-22  Bastien Nocera  <hadess hadess net>
    
    	* browser-plugin/totem-plugin-viewer.c (resolve_uri):
    	Fix resolve_uri returning an empty URI when trying to resolve
    	with a base at the root of a webserver (Closes: #579716)
---
 ChangeLog                            |    6 ++++++
 browser-plugin/totem-plugin-viewer.c |    7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b5c6841..9d73ee9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-22  Bastien Nocera  <hadess hadess net>
+
+	* browser-plugin/totem-plugin-viewer.c (resolve_uri):
+	Fix resolve_uri returning an empty URI when trying to resolve
+	with a base at the root of a webserver (Closes: #579716)
+
 2009-04-21  Bastien Nocera  <hadess hadess net>
 
 	* data/totem-video-thumbnailer.1:
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 3d1c013..b53ce2c 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -698,9 +698,10 @@ resolve_uri (const char *base_uri,
 	base_gfile = g_file_new_for_uri (base_uri);
 	base_parent_gfile = g_file_get_parent (base_gfile);
 	if (!base_parent_gfile) {
-		g_print ("Base URI %s has no parent!\n", base_uri);
-		g_object_unref (base_gfile);
-		return NULL;
+		resolved_gfile = g_file_resolve_relative_path (base_gfile, relative_uri);
+		uri = g_file_get_uri (resolved_gfile);
+		g_object_unref (resolved_gfile);
+		return uri; 
 	}
 	g_object_unref (base_gfile);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]