[totem-pl-parser] plparse: Fix crash when passing a broken URI



commit edd1c84a548d402d7e7fde8c3e7f5ffa666d0b53
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Apr 18 10:55:24 2014 +0200

    plparse: Fix crash when passing a broken URI
    
    totem "totem foo://foobar" crashes because we believe the URI
    is valid, but cannot get the scheme.
    
    Spotted by Mathieu Bridon.

 plparse/totem-pl-parser.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index 184fcdd..fc3cd15 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -1556,6 +1556,8 @@ totem_pl_parser_scheme_is_ignored (TotemPlParser *parser, GFile *uri)
        g_mutex_lock (&parser->priv->ignore_mutex);
 
        scheme = g_file_get_uri_scheme (uri);
+       if (!scheme)
+               return TRUE;
        ret = GPOINTER_TO_INT (g_hash_table_lookup (parser->priv->ignore_schemes, scheme));
        g_free (scheme);
 


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