From: mpi Date: Tue, 9 Jul 2024 16:08:30 +0000 (+0000) Subject: Read the whole buffer, not its size minus one. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=813b934a8a60c6eb1b54365ef190f3583e7dc8ce;p=openbsd Read the whole buffer, not its size minus one. From Christian Ludwig cludwig at genua.de. --- diff --git a/usr.sbin/btrace/btrace.c b/usr.sbin/btrace/btrace.c index a66949cda87..aa75a12f676 100644 --- a/usr.sbin/btrace/btrace.c +++ b/usr.sbin/btrace/btrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.c,v 1.91 2024/05/21 05:00:48 jsg Exp $ */ +/* $OpenBSD: btrace.c,v 1.92 2024/07/09 16:08:30 mpi Exp $ */ /* * Copyright (c) 2019 - 2023 Martin Pieuchot @@ -421,7 +421,7 @@ rules_do(int fd) ssize_t rlen; size_t i; - rlen = read(fd, devtbuf, sizeof(devtbuf) - 1); + rlen = read(fd, devtbuf, sizeof(devtbuf)); if (rlen == -1) { if (errno == EINTR && quit_pending) { printf("\n");