]> Pileus Git - ~andy/gtk/commitdiff
Don't modify scanner->value, copy it first. (#165693, Tommi Komulainen)
authorMatthias Clasen <mclasen@redhat.com>
Wed, 6 Apr 2005 12:45:55 +0000 (12:45 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 6 Apr 2005 12:45:55 +0000 (12:45 +0000)
2005-04-06  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkrc.c (gtk_rc_parse_style): Don't modify scanner->value,
copy it first.  (#165693, Tommi Komulainen)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkrc.c

index 867ec6e5bde819bf156743fcceaea9dc875a3c42..c499a4b6c964de131df94a69c314efd8cdbb8252 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkrc.c (gtk_rc_parse_style): Don't modify scanner->value,
+       copy it first.  (#165693, Tommi Komulainen)
+
 2005-04-05  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus): 
index 867ec6e5bde819bf156743fcceaea9dc875a3c42..c499a4b6c964de131df94a69c314efd8cdbb8252 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkrc.c (gtk_rc_parse_style): Don't modify scanner->value,
+       copy it first.  (#165693, Tommi Komulainen)
+
 2005-04-05  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus): 
index 867ec6e5bde819bf156743fcceaea9dc875a3c42..c499a4b6c964de131df94a69c314efd8cdbb8252 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkrc.c (gtk_rc_parse_style): Don't modify scanner->value,
+       copy it first.  (#165693, Tommi Komulainen)
+
 2005-04-05  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus): 
index 1953cd08443018eb4fc3100a55462476961b5509..82221c8e54bb24113a348e89371a88b3bdc7d387 100644 (file)
@@ -2696,6 +2696,7 @@ gtk_rc_parse_style (GtkRcContext *context,
              scanner->next_value.v_identifier[0] <= 'Z') /* match namespaced type names */
            {
              GtkRcProperty prop = { 0, 0, NULL, { 0, }, };
+             gchar *name;
              
              g_scanner_get_next_token (scanner); /* eat type name */
              prop.type_name = g_quark_from_string (scanner->value.v_identifier);
@@ -2713,8 +2714,10 @@ gtk_rc_parse_style (GtkRcContext *context,
                }
 
              /* it's important that we do the same canonification as GParamSpecPool here */
-             g_strcanon (scanner->value.v_identifier, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-');
-             prop.property_name = g_quark_from_string (scanner->value.v_identifier);
+             name = g_strdup (scanner->value.v_identifier);
+             g_strcanon (name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-');
+             prop.property_name = g_quark_from_string (name);
+             g_free (name)
 
              token = gtk_rc_parse_assignment (scanner, &prop);
              if (token == G_TOKEN_NONE)