]> spindle.queued.net Git - midori/commitdiff
Always copy the filename of extension modules
authorChristian Dywan <christian@twotoasts.de>
Thu, 12 Jul 2012 20:53:54 +0000 (22:53 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 12 Jul 2012 20:53:54 +0000 (22:53 +0200)
There's a suspected memory corruption otherwise.

midori/main.c

index fe3a633e7b1a2c1286a140561a77428f04b0f0ba..b57fef5ac5c1bd08d31fd837ddf5b154968faa7b 100644 (file)
@@ -1246,7 +1246,7 @@ midori_load_module (MidoriApp*   app,
         modules = g_hash_table_new (g_direct_hash, g_direct_equal);
     if (g_hash_table_contains (modules, module))
         return;
-    g_hash_table_insert (modules, module, (gchar*)filename);
+    g_hash_table_insert (modules, module, g_strdup (filename));
 
     if (module && g_module_symbol (module, "extension_init",
                                    (gpointer) &extension_init)