From: Ron Steinke Date: Fri, 10 Aug 2001 14:56:37 +0000 (+0000) Subject: Modified Files: glib/ChangeLog glib/glib/giochannel.c X-Git-Tag: GLIB_1_3_7~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6132f0496a9f27a234c44cfa10988fa44f1c7dc9;p=platform%2Fupstream%2Fglib.git Modified Files: glib/ChangeLog glib/glib/giochannel.c Modified Files: glib/ChangeLog glib/glib/giochannel.c * glib/giochannel.c: Fixed a "sense of comparison" bug, added an assert to check when g_io_channels_read_chars () is looping endlessly due to encoded_read_buf being corrupted. --- diff --git a/ChangeLog b/ChangeLog index a353b0f..9a36dbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a353b0f..9a36dbf 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a353b0f..9a36dbf 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index a353b0f..9a36dbf 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a353b0f..9a36dbf 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a353b0f..9a36dbf 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a353b0f..9a36dbf 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a353b0f..9a36dbf 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2001-08-10 Ron Steinke + + * glib/giochannel.c: Fixed a "sense of comparison" bug, + added an assert to check when g_io_channels_read_chars () + is looping endlessly due to encoded_read_buf being corrupted. + 2001-08-06 Sven Neumann * glib/gutils.[ch]: added new function g_nullify_pointer(). diff --git a/glib/giochannel.c b/glib/giochannel.c index 545ef24..9d747f1 100644 --- a/glib/giochannel.c +++ b/glib/giochannel.c @@ -1207,7 +1207,7 @@ reencode: lastchar = nextchar; break; case -1: - if (oldlen > channel->encoded_read_buf->len) + if (oldlen < channel->encoded_read_buf->len) status = G_IO_STATUS_NORMAL; else { @@ -1677,6 +1677,7 @@ g_io_channel_read_chars (GIOChannel *channel, { prevchar = nextchar; nextchar = g_utf8_next_char (nextchar); + g_assert (nextchar != prevchar); /* Posibile for *prevchar of -1 or -2 */ } while (nextchar < channel->encoded_read_buf->str + got_bytes);