From a4808449923c060d2672f97b08bd56a796b743d0 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Tue, 6 Aug 2019 15:17:34 -0700 Subject: [PATCH] Tighten a too-permissive debug_assert in NafLookupTable8. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This issue was found by Laurent Grémy & Nicolas Surbayrole of Quarkslab. --- src/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.rs b/src/window.rs index 08f2d78..603760e 100644 --- a/src/window.rs +++ b/src/window.rs @@ -171,7 +171,7 @@ pub(crate) struct NafLookupTable8(pub(crate) [T; 64]); impl NafLookupTable8 { pub fn select(&self, x: usize) -> T { debug_assert_eq!(x & 1, 1); - debug_assert!(x < 256); + debug_assert!(x < 128); self.0[x / 2] }