[g-a-devel]Re: g_utf8_get_char use in gail ...



Michael,

Thanks for pointing this out.

Fix committed to GAIL.

Change will also be made to gtkhtml2 accessibility implementation.

Padraig

> Subject: g_utf8_get_char use in gail ...
> To: "Padraig O'Briain" <Padraig Obriain sun com>
> Cc: accessibility mailing list <gnome-accessibility-devel gnome org>
> Content-Transfer-Encoding: 7bit
> Mime-Version: 1.0
> 
> 	This code fragment contains a crasher bug:
> 
> static gunichar 
> gail_entry_get_character_at_offset (AtkText	         *text,
>                                     gint	         offset)
> {
>   GtkWidget *widget;
>   GtkEntry *entry;
>   gchar *string;
>   gchar *index;
> 
>   widget = GTK_ACCESSIBLE (text)->widget;
>   if (widget == NULL)
>     /* State is defunct */
>     return '\0';
> 
>   entry = GTK_ENTRY (widget);
>   string = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
>   index = g_utf8_offset_to_pointer (string, offset);
>   g_free(string);
> 
>   return g_utf8_get_char(index);
> }
> 
> 	It would be good to audit all uses of that method on that basis.
> 
> 	Regards,
> 
> 		Michael.
> 
> -- 
>  mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot
> 




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