From f7fc5b1651da2194cb5c407b35dc9853c06b8ea0 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 12 Mar 2026 18:34:43 +0000 Subject: util/spkmodem-recv: properly handle stdin err Signed-off-by: Leah Rowe --- util/spkmodem_recv/spkmodem-recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 4ff1fb5f..db7454ca 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -212,9 +212,10 @@ read_sample(struct decoder_state *st) READ_BUF, stdin); if (n == 0) { + if (ferror(stdin)) + err(errno, "stdin read"); if (feof(stdin)) exit(EXIT_SUCCESS); - err(errno, "stdin read"); } st->inpos = 0; -- cgit v1.2.1