diff --git a/unblob/handlers/archive/cpio.py b/unblob/handlers/archive/cpio.py index 8310e12303..14128cb79f 100644 --- a/unblob/handlers/archive/cpio.py +++ b/unblob/handlers/archive/cpio.py @@ -165,7 +165,10 @@ def parse(self): # noqa: C901 "CPIO entry filename is not null-byte terminated" ) - filename = snull(tmp_filename).decode("utf-8") + try: + filename = snull(tmp_filename).decode("utf-8") + except UnicodeDecodeError as e: + raise InvalidInputFormat from e if filename == CPIO_TRAILER_NAME: current_offset += self._pad_content(c_filesize)