From 6132f0496a9f27a234c44cfa10988fa44f1c7dc9 Mon Sep 17 00:00:00 2001 From: Ron Steinke Date: Fri, 10 Aug 2001 14:56:37 +0000 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/giochannel.c | 3 ++- 9 files changed, 50 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a353b0f3..9a36dbf0 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 a353b0f3..9a36dbf0 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 a353b0f3..9a36dbf0 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 a353b0f3..9a36dbf0 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 a353b0f3..9a36dbf0 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 a353b0f3..9a36dbf0 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 a353b0f3..9a36dbf0 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 a353b0f3..9a36dbf0 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 545ef24f..9d747f1a 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); -- 2.34.1