Re: gtk_tree_path_prev() corrputing memory



Tim Janik <timj gtk org> writes:

> hi jonathan.
> 
> gboolean
> gtk_tree_path_prev (GtkTreePath *path)
> {
>    g_return_val_if_fail (path != NULL, FALSE);
> 
>    if (path->indices[path->depth - 1] == 0)
>      return FALSE;
> 
>    path->indices[path->depth - 1] -= 1;
> 
>    return TRUE;
> }
> 
> 
> if path->depth==0, this will access invalid memory
> regions (even write to them). i suppose this misses a
> if (!path->depth) return FALSE; ?

Matthias apparently fixed this this morning.  Can you file a bug in
bugzilla.gnome.org on issues like this in the future?

Thanks,
-Jonathan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]