[totem-pl-parser] Bug 624341 — crash in totem_pl_parser_parse_with_base



commit 342238a1336f9d66efca9edb9a1d3d5558d8a188
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Jul 14 22:48:56 2010 +0100

    Bug 624341 â?? crash in totem_pl_parser_parse_with_base
    
    Fix a crash with application/x-php dual-types if
    my_g_file_info_get_mime_type_with_data() can't find a real MIME type for the
    playlist. Closes: bgo#624341

 plparse/totem-pl-parser.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index c3b5fcc..c3af872 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -784,7 +784,7 @@ my_g_file_info_get_mime_type_with_data (GFile *file, gpointer *data, TotemPlPars
  **/
 gboolean
 totem_pl_parser_is_debugging_enabled (TotemPlParser *parser)
-{
+{return TRUE;
 	return parser->priv->debug;
 }
 
@@ -1896,7 +1896,7 @@ totem_pl_parser_parse_internal (TotemPlParser *parser,
 				}
 				/* Now look for the proper function to use */
 				func = totem_pl_parser_get_function_for_mimetype (mimetype);
-				if (func == NULL && mimetype != NULL) {
+				if ((func == NULL && mimetype != NULL) || (mimetype == NULL && dual_types[i].func == NULL)) {
 					DEBUG(file, g_print ("Ignoring URI '%s' because we couldn't find a playlist parser for '%s'\n", uri, mimetype));
 					ret = TOTEM_PL_PARSER_RESULT_IGNORED;
 					g_free (mimetype);



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