Skip to content

Commit 20bc328

Browse files
committed
Add debug assertion
1 parent e8b610f commit 20bc328

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stage2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ use value_trait::StaticNode;
88
#[cfg_attr(not(feature = "no-inline"), inline(always))]
99
#[allow(clippy::cast_ptr_alignment)]
1010
pub fn is_valid_true_atom(loc: &[u8]) -> bool {
11+
debug_assert!(loc.len() >= 8, "input too short to safely read a u64 from");
12+
1113
// TODO is this expensive?
1214
let mut error: u64;
1315
unsafe {

0 commit comments

Comments
 (0)