[git commit] unzip: increase PEEK_FROM_END from 16k to 64k

Denys Vlasenko vda.linux at googlemail.com
Sat Jul 20 13:20:46 UTC 2013


commit: http://git.busybox.net/busybox/commit/?id=5e87e8aebb60bc87d3dd6e07814c7c3b0e8dbbb2
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 archival/unzip.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/archival/unzip.c b/archival/unzip.c
index e4c8248..c250d75 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -163,7 +163,14 @@ enum { zip_fd = 3 };
 
 #if ENABLE_DESKTOP
 
-#define PEEK_FROM_END 16384
+/* Seen in the wild:
+ * Self-extracting PRO2K3XP_32.exe contains 19078464 byte zip archive,
+ * where CDE was nearly 48 kbytes before EOF.
+ * (Surprisingly, it also apparently has *another* CDE structure
+ * closer to the end, with bogus cdf_offset).
+ * To make extraction work, bumped PEEK_FROM_END from 16k to 64k.
+ */
+#define PEEK_FROM_END (64*1024)
 
 /* NB: does not preserve file position! */
 static uint32_t find_cdf_offset(void)


More information about the busybox-cvs mailing list