From 9c0e544e79a4f7874dab449674a11d899bf61963 Mon Sep 17 00:00:00 2001 From: Igor Tolmachev Date: Tue, 16 Jul 2024 20:08:01 +0900 Subject: Add tests and fix bugs --- src/zip/encryption.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/zip/encryption.rs') diff --git a/src/zip/encryption.rs b/src/zip/encryption.rs index 28a6bdb..76824a1 100644 --- a/src/zip/encryption.rs +++ b/src/zip/encryption.rs @@ -72,7 +72,7 @@ impl WeakDecoder { fn decode_byte(&mut self, byte: u8) -> u8 { let key = self.key2 | 2; - let byte = byte ^ ((key * (key ^ 1)) >> 8) as u8; + let byte = byte ^ ((key.wrapping_mul(key ^ 1)) >> 8) as u8; self.update_keys(byte); byte } -- cgit v1.2.3