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
This commit is contained in:
Matthias Clasen 2007-04-28 21:29:05 +00:00 committed by Matthias Clasen
parent 92563b7d22
commit 6c98ef3356
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
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),

View File

@ -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;

View File

@ -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;