commit 8ef8b8a42a941f07f0e6b61aee167b853fd16f4c parent d5170988d48fa480bb70f4e33ed3ff2a320a4dfd Author: wwp <subscript@free.fr> Date: Sat, 11 Sep 2021 23:29:51 +0200 Better check for read() errors. Diffstat:
| M | src/action.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/action.c b/src/action.c @@ -1570,7 +1570,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;