We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0306b20 commit 01e3f9aCopy full SHA for 01e3f9a
zlib-rs/src/inflate/writer.rs
@@ -108,7 +108,7 @@ impl<'a> Writer<'a> {
108
) {
109
let len = range.end - range.start;
110
111
- if self.remaining() >= core::mem::size_of::<C>() {
+ if self.remaining() >= len + core::mem::size_of::<C>() {
112
// Safety: we know that our window has at least a core::mem::size_of::<C>() extra bytes
113
// at the end, making it always safe to perform an (unaligned) Chunk read anywhere in
114
// the window slice.
0 commit comments