mirror of https://github.com/aya-rs/aya
Fix the log buffer bounds
Change 821ba0b243fd removed the `size > buf.len()` check, which was a mistake, because we might write to a subslice of the whole buffer, so then `buf` can be lower than `LOG_BUF_CAPACITY`. This change compares `size` with `min::(buf.len(), LOG_BUF_CAPACITY)` instead. Fixes: 821ba0b243fd ("Ensure log buffer bounds") Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>pull/350/head
parent
2e0702854b
commit
28abaece2a
Loading…
Reference in New Issue