diff --git a/src/block.rs b/src/block.rs index 5423631..b9b353e 100644 --- a/src/block.rs +++ b/src/block.rs @@ -43,6 +43,7 @@ pub struct Address { impl Address { pub unsafe fn new_unchecked(block: usize, offset: usize) -> Address { + assert!(offset < S::SIZE, "offset out of block bounds"); let _phantom = PhantomData; Address { block,