diff --git a/androscalpel_serializer/src/file_reader.rs b/androscalpel_serializer/src/file_reader.rs index 8b8d1ca..6f77979 100644 --- a/androscalpel_serializer/src/file_reader.rs +++ b/androscalpel_serializer/src/file_reader.rs @@ -237,9 +237,11 @@ impl<'a> DexFileReader<'a> { } fn sanity_check(&self) -> Result<()> { - if self.header.magic.version != [0x30, 0x33, 0x39] { + let version = self.header.magic.version; + let version = (version[0] - 0x30) * 100 + (version[1] - 0x30) * 10 + (version[2] - 0x30); + if version > 39 { warn!( - "DEX 039 is the only version currently supported, found {}", + "Only version <= DEX 039 are currently supported, found {}", std::str::from_utf8(self.header.magic.version.as_slice()) .unwrap_or(&format!("{:x?}", self.header.magic.version)) );