diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-12 18:34:43 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-12 18:34:43 +0000 |
| commit | f7fc5b1651da2194cb5c407b35dc9853c06b8ea0 (patch) | |
| tree | d1fe6f5e25ea90a79c029b0ac81631be922aae51 | |
| parent | 22af92b4736f1c1716e32d3c06b2c64e49f30dc2 (diff) | |
util/spkmodem-recv: properly handle stdin err
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
