Commit 969af34b by Craig Heffner

Fixed cpio bug

parent 070e8572
...@@ -88,9 +88,10 @@ class CPIOPlugin(binwalk.core.plugin.Plugin): ...@@ -88,9 +88,10 @@ class CPIOPlugin(binwalk.core.plugin.Plugin):
# Validate the reported name length # Validate the reported name length
file_name = self._get_file_name(result.description) file_name = self._get_file_name(result.description)
file_name_length = self._get_file_name_length( file_name_length = self._get_file_name_length(result.description)
result.description)
if len(file_name) != file_name_length: # The +1 is to account for string lengths that include the terminating NULL byte
if file_name_length not in [len(file_name), len(file_name)+1]:
result.valid = False result.valid = False
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment