Copy the complete value table, not just the first 4 bytes. (#348136,
authorMatthias Clasen <mclasen@redhat.com>
Fri, 21 Jul 2006 13:57:25 +0000 (13:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 21 Jul 2006 13:57:25 +0000 (13:57 +0000)
2006-07-21  Matthias Clasen  <mclasen@redhat.com>

* gtypemodule.c (g_type_module_register_type): Copy the complete
value table, not just the first 4 bytes.  (#348136, Coverity)

gobject/ChangeLog
gobject/gtypemodule.c

index 6d987f0..98fbac0 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-21  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtypemodule.c (g_type_module_register_type): Copy the complete
+       value table, not just the first 4 bytes.  (#348136, Coverity)
+
 2006-07-02  Matthias Clasen  <mclasen@redhat.com>
 
        * === Released 2.12.0 ===
index 7a4ef21..47e5247 100644 (file)
@@ -335,7 +335,7 @@ g_type_module_register_type (GTypeModule     *module,
   module_type_info->info = *type_info;
   if (type_info->value_table)
     module_type_info->info.value_table = g_memdup (type_info->value_table,
-                                                  sizeof (type_info->value_table));
+                                                  sizeof (GTypeValueTable));
 
   return module_type_info->type;
 }