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 48517bc commit 0de66adCopy full SHA for 0de66ad
cipher/src/stream_wrapper.rs
@@ -47,6 +47,9 @@ where
47
#[inline]
48
fn get_pos(&self) -> usize {
49
let pos = self.pos as usize;
50
+ if T::BlockSize::USIZE == 0 {
51
+ panic!("Block size can not be equal to zero");
52
+ }
53
if pos >= T::BlockSize::USIZE {
54
debug_assert!(false);
55
// SAFETY: `pos` is set only to values smaller than block size
0 commit comments