talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit ea54e7760f270f4f8a6666cc2315e48daf0b0110
parent 542c66f3f813801b9eeab84432d2e01e4a890aee
Author: Colin Leroy <colin@colino.net>
Date:   Thu,  8 Oct 2015 19:13:17 +0200

Fix unchecked return value

Diffstat:
Msrc/compose.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compose.c b/src/compose.c @@ -9443,7 +9443,10 @@ static gboolean compose_input_cb(GIOChannel *source, GIOCondition condition, debug_print("Compose: input from monitoring process\n"); - g_io_channel_read_chars(source, buf, sizeof(buf), &bytes_read, NULL); + if (g_io_channel_read_chars(source, buf, sizeof(buf), &bytes_read, NULL) != G_IO_STATUS_NORMAL) { + bytes_read = 0; + buf[0] = '\0'; + } g_io_channel_shutdown(source, FALSE, NULL); g_io_channel_unref(source);