diff options
author | truckman <truckman@FreeBSD.org> | 2016-05-23 05:25:29 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2016-05-23 05:25:29 +0000 |
commit | 1a3fe93a58058dd57250ad95a05968b61346a3a8 (patch) | |
tree | d597481d92870a8b4ce15fd0e4217319daac3f1b /usr.bin | |
parent | f96505120260da281a50efdd9dd35ba23971a58d (diff) | |
download | FreeBSD-src-1a3fe93a58058dd57250ad95a05968b61346a3a8.zip FreeBSD-src-1a3fe93a58058dd57250ad95a05968b61346a3a8.tar.gz |
MFC r299971
Fix off by one error that overflowed the rep_len array when doing
the final NUL termination.
Reported by: Coverity
CID: 1007617
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/chat/chat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/chat/chat.c b/usr.bin/chat/chat.c index 522762d..fa2df10 100644 --- a/usr.bin/chat/chat.c +++ b/usr.bin/chat/chat.c @@ -521,7 +521,7 @@ void terminate(int status) size_t rep_len; rep_len = strlen(report_buffer); - while (rep_len + 1 <= sizeof(report_buffer)) { + while (rep_len + 1 < sizeof(report_buffer)) { alarm(1); c = get_char(); alarm(0); |