aboutsummaryrefslogtreecommitdiff
path: root/archival/unzip.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * unzip: do not use CDF.extra_len, read local file header. Closes 9536Denys Vlasenko2017-01-081-114/+122
| | | | | | | | | | | | | | | | | | While at it, shorten many field and variable names. function old new delta unzip_main 2334 2376 +42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | unzip: use data from local header rather than CDFRon Yorston2017-01-081-1/+1
| | | | | | | | | | | | | | | | The zip file referenced in this bug report: https://bugs.busybox.net/show_bug.cgi?id=9536 isn't extracted correctly with the upstream fix.
* | Merge branch 'busybox' into mergeRon Yorston2017-01-081-123/+163
|\|
| * unzip: remove now-pointless lseek which returns current positionCristian Ionescu-Idbohrn2017-01-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | archival/unzip.c: In function 'read_next_cdf': archival/unzip.c:271:8: warning: variable 'org' set but not used [-Wunused-but-set-variable] off_t org; ^~~ Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fix in config help textDenys Vlasenko2017-01-051-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: properly use CDF to find compressed files. Closes 9536Denys Vlasenko2017-01-051-120/+165
| | | | | | | | | | | | | | function old new delta unzip_main 2437 2350 -87 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-05-161-42/+96
|\|
| * *: slap on a few ALIGN1/2s where appropriateDenys Vlasenko2016-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map" text data bss dec hex filename 829901 4086 1904 835891 cc133 busybox_before 829665 4086 1904 835655 cc047 busybox Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: shorter code for date/time generationDenys Vlasenko2016-04-181-6/+6
| | | | | | | | | | | | | | function old new delta unzip_main 2426 2414 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: better match for "standard" unzip's output; string shrinkageDenys Vlasenko2016-04-181-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2490 2426 -64 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-64) Total: -64 bytes text data bss dec hex filename 924008 906 17160 942074 e5ffa busybox_old 923846 906 17160 941912 e5f58 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: fix percent overflow; show "stored" files properlyDenys Vlasenko2016-04-181-6/+29
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: fix a case where we find wrong CDE. Closes 8821Denys Vlasenko2016-04-171-8/+35
| | | | | | | | | | | | | | function old new delta unzip_main 2472 2490 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-07-141-2/+0
|\|
| * Removes stray empty line from codeManinder Singh2015-07-131-2/+0
| | | | | | | | | | | | | | | | | | This patch removes stray empty line from busybox code reported by script find_stray_empty_lines Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-03-141-11/+24
|\| | | | | | | | | | | Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
| * unzip: prevent attacks via malicious filenamesDenys Vlasenko2015-02-101-11/+24
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Use MinGW-w64 by defaultRon Yorston2015-01-071-1/+1
| |
* | Changes to allow building with MinGW-w64Ron Yorston2015-01-051-0/+3
|/
* libarchive: add capability to unpack to mem.bufferDenys Vlasenko2014-12-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The performance and number of processes for a "depmod -a" with gzipped modules was abysmal. This patch adds a code path without fork, benefiting all users of xmalloc_open_zipped_read_close. "modinfo radeon.ko.gz", a single-file reader, got 30% faster. "depmod -a", which used to fork over 800 times, got 20% faster. Heavily based on a patch by Lauri Kasanen <curaga@operamail.com> function old new delta setup_transformer_on_fd - 159 +159 transformer_write - 122 +122 fork_transformer - 112 +112 xmalloc_open_zipped_read_close 63 118 +55 read_bunzip 1866 1896 +30 xtransformer_write - 19 +19 unzip_main 2449 2462 +13 bbunpack 755 766 +11 unpack_lzma_stream 2717 2723 +6 unpack_xz_stream 2393 2397 +4 unpack_Z_stream 1173 1175 +2 inflate_unzip 111 105 -6 check_signature16 70 63 -7 unpack_bz2_stream 359 349 -10 unpack_unxz 12 - -12 unpack_unlzma 12 - -12 unpack_uncompress 12 - -12 unpack_gunzip 12 - -12 unpack_bunzip2 12 - -12 open_transformer 106 92 -14 inflate_unzip_internal 1945 1916 -29 unpack_gz_stream 693 655 -38 open_zipped 89 47 -42 setup_unzip_on_fd 142 53 -89 ------------------------------------------------------------------------------ (add/remove: 4/5 grow/shrink: 7/8 up/down: 533/-295) Total: 238 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Rename transformer_aux_data_t -> transformer_state_tDenys Vlasenko2014-12-071-6/+6
| | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival/*: move "config:" snippets into .c filesDenys Vlasenko2013-11-141-0/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival/*: move "applet:" snippets into .c files, part 2Denys Vlasenko2013-11-141-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival/*: move "kbuild:" snippets into .c filesDenys Vlasenko2013-11-141-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: survive lack of CDF on non-streaming zip filesDenys Vlasenko2013-07-211-16/+39
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: increase PEEK_FROM_END from 16k to 64kDenys Vlasenko2013-07-201-1/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: add missing fflush; code shrinkDenys Vlasenko2013-01-221-8/+11
| | | | | | | | function old new delta my_fgets80 - 41 +41 unzip_main 2291 2242 -49 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: reuse more stringsDenys Vlasenko2013-01-221-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tweak help textDenys Vlasenko2012-06-191-6/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: make options parsing more robust on getopt w/o gnu extensionsDenys Vlasenko2012-06-151-67/+70
| | | | | | | | | | | | | Also, code shrank: function old new delta static.extn 15 10 -5 packed_usage 29231 29217 -14 unzip_main 2388 2291 -97 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-116) Total: -116 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: ignore chmod errorsNatanael Copa2012-05-281-1/+1
| | | | | | | | This makes unzip to FAT filesystems not exit with error. This is similar to how the "normal" unzip works. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* update seamless uncompression codeDenys Vlasenko2012-03-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes "tar tf hello_world.txz" work without adding special-casing for ".txz" extension. It also removes ever-growing magic checking code in rpm2cpio and get_header_tar - we reuse one which lives in setup_unzip_on_fd. function old new delta unpack_gz_stream 7 566 +559 check_signature16 - 70 +70 setup_unzip_on_fd 99 142 +43 handle_SIGCHLD - 41 +41 unpack_bz2_stream 342 376 +34 unzip_main 2352 2385 +33 bbunpack 503 533 +30 open_transformer 74 102 +28 unpack_Z_stream 1278 1304 +26 unpack_gunzip 101 123 +22 init_transformer_aux_data - 18 +18 unpack_xz_stream 2388 2402 +14 open_zipped 131 141 +10 rpm_main 1358 1363 +5 get_header_tar_lzma 52 57 +5 get_header_tar_bz2 52 57 +5 unpack_lzma_stream 2698 2702 +4 hash_find 234 233 -1 get_header_tar 1759 1733 -26 get_header_tar_gz 92 57 -35 unpack_uncompress 51 12 -39 rpm2cpio_main 201 147 -54 unpack_unxz 67 12 -55 unpack_bz2_stream_prime 55 - -55 get_header_tar_Z 86 - -86 unpack_gz_stream_with_info 539 - -539 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890) Total: 57 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rename archive.h to bb_archive.h. no code changesDenys Vlasenko2011-09-221-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: fflush stdout before reading interative y/n answer from stdinDenys Vlasenko2011-09-091-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move help text from include/usage.src.h to archival/*.cPere Orga2011-03-271-0/+13
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rename archival/libunarchive -> archival/libarchive; move bz/ into itDenys Vlasenko2010-11-031-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass cosmetic removal of extra empty lines. no code changesDenys Vlasenko2010-07-261-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Improve unzip's handling of stream ZIP filesDan Fandrich2010-06-181-4/+9
| | | | | | | | | | | Search harder for the ZIP magic numbers at the end of a file by checking 16 KiB from the end instead of just 1 KiB. ZIP files with long comments (such as certain cryptographically signed files) or those sitting in a wrapper could have more than 1 KiB of data after the magic numbers, so they couldn't be read. Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: another small code shrinkDenys Vlasenko2010-05-241-2/+2
| | | | | | | function old new delta find_cdf_offset 173 160 -13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: tiny code shrink -2 bytesDenys Vlasenko2010-05-241-5/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: restore unix file mode if possible. closes bug 1045Denys Vlasenko2010-05-241-55/+88
| | | | | | | | | function old new delta unzip_main 2197 2188 -9 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 173/-182) Total: -9 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: more compat if DESKTOP=yDenys Vlasenko2009-09-061-29/+118
| | | | | | | | | | | | function old new delta DESKTOP off: unzip_main 1648 1629 -19 DESKTOP=y: unzip_main 1939 2197 +258 Without this, midnight commander can't display .zip files Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: try lseek before resorting to readingStefani Seibold2009-07-251-1/+2
| | | | | | | function old new delta unzip_skip 16 43 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: fix thinko with le/be conv and size (closes bug 129)Denis Vlasenko2009-02-261-1/+1
| | | | | awk: make "struct global" hack more robust wrt alignment (closes bug 131)
* unzip: handle "central directory"Denis Vlasenko2008-09-211-47/+196
| | | | | | | | | | | | | needed for OpenOffice, gmail attachment .zips etc conditional on CONFIG_DESKTOP function old new delta unzip_main 1643 1939 +296 find_cds_offset - 173 +173 unzip_skip 11 16 +5 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 474/0) Total: 474 bytes
* unzip: move check for unsupported zip features to better placeDenis Vlasenko2008-07-261-15/+17
|
* unzip: give better error message when presented with unsupportedDenis Vlasenko2008-07-261-0/+6
| | | | | | zip file. Add zip documentation and an example of file we cant (yet) unpack.
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-5/+5
|
* style fixes, no code changesDenis Vlasenko2008-06-261-3/+3
|