A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Add an extra assert to internal buffers in futures/streams (#13103)
Alex Crichton8f0a3dba4d19
diff --git a/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams/buffers.rs b/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams/buffers.rsindex 894ba19c8c..7e6b77c1bb 100644--- a/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams/buffers.rs+++ b/crates/wasmtime/src/runtime/component/concurrent/futures_and_streams/buffers.rs@@ -223,6 +223,7 @@ pub struct SliceBuffer {impl SliceBuffer {pub fn new(buffer: Vec<u8>, offset: usize, limit: usize) -> Self {+ assert!(offset <= limit);assert!(limit <= buffer.len());Self {buffer,