fix issues 1067 and 1069

This commit is contained in:
erev0s 2024-08-17 10:26:13 +03:00
parent ba16da0c04
commit c6485bf4ad
2 changed files with 3 additions and 3 deletions

View File

@ -445,7 +445,7 @@ class AXMLParser:
# The file can still be parsed up to the point where the chunk should end.
self.axml_tampered = True
logger.warning("Declared filesize ({}) is smaller than total file size ({}). "
"Was something appended to the file? Trying to parse it anyways.".format(self.filesize, self.buff.size()))
"Was something appended to the file? Trying to parse it anyways.".format(self.filesize, self.buff_size))
# Not that severe of an error, we have plenty files where this is not
# set correctly
@ -1407,7 +1407,7 @@ class ARSCParser:
self.buff_size = self.buff.raw.getbuffer().nbytes
if self.buff_size < 8 or self.buff_size > 0xFFFFFFFF:
raise ResParserError("Invalid file size {} for a resources.arsc file!".format(self.buff.size()))
raise ResParserError("Invalid file size {} for a resources.arsc file!".format(self.buff_size))
self.analyzed = False
self._resolved_strings = None

View File

@ -8262,7 +8262,7 @@ class DEX:
:rtype: a list with all strings used in the format (types, names ...)
"""
return [i.get() for i in self.strings]
return [i.get() for i in self.strings] if self.strings is not None else []
def get_len_strings(self) -> int:
"""