Commit 6c98ef33 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Recognize negative column indices as invalid. (#415260, Chris Wilson)

2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkliststore.c (gtk_list_store_set_valist_internal):
        * gtk/gtktreestore.c (gtk_tree_store_set_valist_internal):
        Recognize negative column indices as invalid.  (#415260,
        Chris Wilson)


svn path=/trunk/; revision=17681
parent 92563b7d
2007-04-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_valist_internal):
* gtk/gtktreestore.c (gtk_tree_store_set_valist_internal):
Recognize negative column indices as invalid. (#415260,
Chris Wilson)
2007-04-28 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gdk/quartz/gdkeventloop-quartz.c: (select_thread_func),
......
......@@ -731,7 +731,7 @@ gtk_list_store_set_valist_internal (GtkListStore *list_store,
GValue value = { 0, };
gchar *error = NULL;
if (column >= list_store->n_columns)
if (column < 0 || column >= list_store->n_columns)
{
g_warning ("%s: Invalid column number %d added to iter (remember to end your list of columns with a -1)", G_STRLOC, column);
break;
......
......@@ -884,7 +884,7 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store,
GValue value = { 0, };
gchar *error = NULL;
if (column >= tree_store->n_columns)
if (column < 0 || column >= tree_store->n_columns)
{
g_warning ("%s: Invalid column number %d added to iter (remember to end your list of columns with a -1)", G_STRLOC, column);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment