# HG changeset patch # User William Pitcock # Date 1241112434 18000 # Node ID 1d42b759a2a9cafbc8eb9017b6cd9e03c7e5a588 # Parent 2541e02c077e3a9cc977e88ec20a2b3232124136 gio: getc() would infinite loop in a situation diff -r 2541e02c077e -r 1d42b759a2a9 src/gio/gio.c --- a/src/gio/gio.c Thu Apr 30 11:10:58 2009 -0500 +++ b/src/gio/gio.c Thu Apr 30 12:27:14 2009 -0500 @@ -171,7 +171,7 @@ handle->stream_stack = g_slist_delete_link(handle->stream_stack, handle->stream_stack); return buf; } - else if (g_input_stream_read(G_INPUT_STREAM(handle->istream), &buf, 1, NULL, NULL) == -1) + else if (g_input_stream_read(G_INPUT_STREAM(handle->istream), &buf, 1, NULL, NULL) != 1) return EOF; return buf;