Re: Outstanding patches, #57613



If there is a logic error, it is in _gtk_text_buffer_get_line_log_error: It
has

g_return_val_if_fail (!gtk_text_iter_is_end (anywhere_in_line, NULL));

thus is cannot be called for the end iter. But many places in gtktextiter.c
call
it without checking for this. What the proposed patch does is insert this
check in one place, leaving many others open to the same problem. How
should this be fixed ?

Matthias



----- Original Message -----
From: "Havoc Pennington" <hp redhat com>
To: "Matthias Clasen" <matthiasc poet de>
Cc: <gtk-devel-list gnome org>
Sent: Friday, August 10, 2001 1:59 AM
Subject: Re: Outstanding patches, #57613


>
> "Matthias Clasen" <matthiasc poet de> writes:
> > The bug is: If an iter points to the last position in a buffer
> > gtk_text_iter_forward_cursor_position() crashes.
> >
> > Is the proposed patch ok to commit ?
>
> I'd like to be sure there isn't a logic bug in forward_cursor_position
> causing this (off-by-one, etc.) before fixing it this way. Have you
> investigated that?
>
> For example maybe a <= should be <, or something. Then that could show
> up in other cases as well.
>
> Havoc





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