]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
7zip: Increase minimum ELF header length
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 5 Jun 2025 19:36:23 +0000 (21:36 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 5 Jun 2025 19:36:23 +0000 (21:36 +0200)
The 64 bit format requires at least 63 bytes, so increase this limit.
Such small binaries most likely don't contain 7zip data anyway.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_read_support_format_7zip.c

index f273f84be521d44079fb0211ca159387034525fc..b20aa5e6dbf3846b760d9989adbd7d8866f48325 100644 (file)
@@ -80,7 +80,7 @@
 /*
  * ELF format
  */
-#define ELF_HDR_MIN_LEN 0x34
+#define ELF_HDR_MIN_LEN 0x3f
 #define ELF_HDR_EI_CLASS_OFFSET 0x04
 #define ELF_HDR_EI_DATA_OFFSET 0x05