diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2024-01-16 02:55:58 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2024-02-06 15:31:24 +0000 |
commit | 81ef0de636ff8ba0b8057ced593f2ab92597b1a6 (patch) | |
tree | dcb42ba05e1d30e7942ee986a337878d4aa856a3 /contrib/libxo/xohtml | |
parent | dc30b2841b7d9903f543f69ac10c8ebe6c6ecc69 (diff) |
kern: tty: fix ttyinq_read_uio assertion
It's clear from later context that `rlen` was always expected to include
`flen`, as we'll trim `flen` bytes from the end of the read. Relax our
initial assertion to only require the total size less trimmed bytes to
lie within the out buffer size.
While we're here, I note that if we have to read more than one block and
we're trimming from the end then we'll do the wrong thing and omit
`flen` bytes from every block, rather than just the end. Add an
assertion to make sure we're not doing that, but the only caller that
specifies a non-zero `flen` today will only really be doing so if rlen
is entirely within a single buffer.
Reviewed by: cy, imp
(cherry picked from commit 09a43b8790bdeb97fbecd3ea767c2f599eb4a4d3)
Diffstat (limited to 'contrib/libxo/xohtml')
0 files changed, 0 insertions, 0 deletions