diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:23:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 19:23:00 +0000 |
commit | 803b3a091c225d48395508a8f9ffa6e08cbddc5b (patch) | |
tree | a3168c9e7da8991c423b5978aacf90c3c2b135c1 /term-utils/ttymsg.c | |
parent | Releasing progress-linux version 2.40-8~progress7.99u1. (diff) | |
download | util-linux-803b3a091c225d48395508a8f9ffa6e08cbddc5b.tar.xz util-linux-803b3a091c225d48395508a8f9ffa6e08cbddc5b.zip |
Merging upstream version 2.40.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'term-utils/ttymsg.c')
-rw-r--r-- | term-utils/ttymsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/term-utils/ttymsg.c b/term-utils/ttymsg.c index faa0344..ef7e358 100644 --- a/term-utils/ttymsg.c +++ b/term-utils/ttymsg.c @@ -123,7 +123,7 @@ ttymsg(struct iovec *iov, size_t iovcnt, char *line, int tmout) { iovcnt * sizeof(struct iovec)); iov = localiov; } - for (cnt = 0; wret >= (ssize_t) iov->iov_len; ++cnt) { + for (cnt = 0; wret >= (ssize_t) iov->iov_len && iovcnt > 0; ++cnt) { wret -= iov->iov_len; ++iov; --iovcnt; |