fix sanity check

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2023-08-31 17:00:31 +02:00
parent a4e5679c7b
commit a9da701e51
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -239,9 +239,7 @@ impl<'a> DexFileReader<'a> {
self.header.class_defs_off, self.header.class_defs_size self.header.class_defs_off, self.header.class_defs_size
))) )))
} }
MapItemType::CallSiteIdItem => todo!(), MapItemType::MapList if item.offset != self.header.map_off || item.size != 1 => {
MapItemType::MethodHandleItem => todo!(),
MapItemType::MapList if item.offset != self.header.map_off || item.size != 0 => {
return Err(Error::InconsistantStruct(format!( return Err(Error::InconsistantStruct(format!(
"Inconsistant MapList Mapping info found in map_list: {item:x?}, \ "Inconsistant MapList Mapping info found in map_list: {item:x?}, \
header.map_list_off: 0x{:x}", header.map_list_off: 0x{:x}",
@ -249,6 +247,8 @@ impl<'a> DexFileReader<'a> {
))) )))
} }
/* /*
MapItemType::CallSiteIdItem => todo!(),
MapItemType::MethodHandleItem => todo!(),
MapItemType::TypeList => todo!(), MapItemType::TypeList => todo!(),
MapItemType::AnnotationSetRefList => todo!(), MapItemType::AnnotationSetRefList => todo!(),
MapItemType::AnnotationSetItem => todo!(), MapItemType::AnnotationSetItem => todo!(),