Re: possible deadlock on invalid UTF-8 data



Daniel Elstner <daniel elstner gmx net> writes:

> OK to check in the attached patch?

Yes, go ahead.
                                        Owen

> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/glib/ChangeLog,v
> retrieving revision 1.947
> diff -u -3 -r1.947 ChangeLog
> --- ChangeLog	2001/11/27 23:30:07	1.947
> +++ ChangeLog	2001/11/28 16:26:22
> @@ -1,3 +1,8 @@
> +2001-11-28  Daniel Elstner  <daniel elstner gmx net>
> +
> +	* glib/gutf8.c: In order to avoid infinite loops on invalid UTF-8
> +	strings, change the skip count for 0xfe and 0xff from 0 to 1.
> +
>  2001-11-28  Tor Lillqvist  <tml iki fi>
>  
>  	* glibconfig.h.win32.in: Add GLIB_SIZEOF_SIZE_T here, too.
> Index: glib/gutf8.c
> ===================================================================
> RCS file: /cvs/gnome/glib/glib/gutf8.c,v
> retrieving revision 1.28
> diff -u -3 -r1.28 gutf8.c
> --- glib/gutf8.c	2001/09/27 02:49:05	1.28
> +++ glib/gutf8.c	2001/11/28 16:26:25
> @@ -109,7 +109,7 @@
>    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
>    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
>    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
> -  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0
> +  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1
>  };
>  
>  const gchar * const g_utf8_skip = utf8_skip_data;



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