diff options
Diffstat (limited to 'libexec/rshd/rshd.c')
-rw-r--r-- | libexec/rshd/rshd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index cea958d..6e09227 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -721,6 +721,7 @@ getstr(buf, cnt, err) if (read(STDIN_FILENO, &c, 1) != 1) exit(1); *buf++ = c; + if (--cnt == 0) errx(1, "%s too long", err); } while (c != 0); } |