talons

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

commit 8cb4112c152c5e3b155fcfba18246febda805acb
parent a223eeb176a9b5afc5e98d959ae2ab9fc3352246
Author: wwp <subscript@free.fr>
Date:   Sat, 11 Sep 2021 23:29:51 +0200

Better check for read() errors.

Diffstat:
Msrc/action.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/action.c b/src/action.c @@ -1575,7 +1575,7 @@ static void catch_output(gpointer data, gint source, GIOCondition cond) gchar *ret_str; c = read(source, buf, sizeof(buf) - 1); - if (c == 0) + if (c <= 0) break; buf[c] = 0;