projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
542c66f
)
Fix unchecked return value
author
Colin Leroy
<colin@colino.net>
Thu, 8 Oct 2015 17:13:17 +0000
(19:13 +0200)
committer
Colin Leroy
<colin@colino.net>
Thu, 8 Oct 2015 17:13:17 +0000
(19:13 +0200)
src/compose.c
patch
|
blob
|
history
diff --git
a/src/compose.c
b/src/compose.c
index 285158f163ee0622e3356776f6edc16901a267a2..ed92268122df1c84c43ecc1cec53e32e65132ac4 100644
(file)
--- 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);