Commit graph

878 commits

Author SHA1 Message Date
Peter Hyman 4e4fa1770a configure --enable-static-bin fix
Some distros do not include the static liblzo2 library.
This causes linking static to fail because libtool tries
to link a dynamic liblzo2.so into a static lrzip.

Inserted minilzo in the source treeto compile along with lrzip.
Minilzo is written by Markus F.X.J. Oberhumer
https://www.oberhumer.com/opensource/lzo/
2020-04-17 10:19:07 -05:00
Con Kolivas 4f1adeaec4 Attempt to allocate buffer when it is larger than maxram instead of aborting without even trying. 2019-12-03 12:40:06 +11:00
Con Kolivas 86661e68bf Skip empty match blocks if they're found at the end as they may be created with incompressible data. 2019-12-03 12:22:11 +11:00
Con Kolivas 93d579a1b8 Fix misuse of static variable in a header. 2019-12-03 11:23:58 +11:00
Con Kolivas c90c71782e
Merge pull request #137 from pete4abw/fixasm
HOTFIX for compiling with --disable-asm or no assembler present
2019-12-03 07:09:01 +11:00
Peter Hyman db8d1d56e7 HOTFIX for compiling with --disable-asm or no assembler present 2019-12-02 12:30:26 -06:00
Con Kolivas ee14f163f7
Merge pull request #134 from pete4abw/lzma-memory
Small changes to control->threads and memory overhead for LZMA.
2019-12-02 22:31:55 +11:00
Con Kolivas 3d7eb6fbae
Merge pull request #128 from pete4abw/conf_file_fix
fix to allow compression in lrzip.conf to be overridden by command line
2019-12-02 22:31:22 +11:00
Con Kolivas a82adac548
Merge pull request #135 from pete4abw/fixasm
Update and bring back Assembler code for CRC check.
2019-12-02 22:30:40 +11:00
Con Kolivas 4af85e0496
Merge pull request #136 from pete4abw/set_priority
Fixups to nice handling. Users can't normally lower niceness.
2019-12-02 22:28:15 +11:00
Con Kolivas ffd4a2df50
Merge pull request #121 from pete4abw/lrztar
lrztar -o fix
2019-12-02 22:26:50 +11:00
Peter Hyman 9b20563ef5 Fixups to nice handling. Users can't normally lower niceness. 2019-11-26 04:50:31 -06:00
Peter Hyman 9f16f65705 Update and bring back Assembler code for CRC check. 2019-11-25 08:44:46 -06:00
Peter Hyman 1e16f7bd02 Small changes to control->threads and memory overhead for LZMA. 2019-11-25 08:30:34 -06:00
Con Kolivas 02a7bdc6c4
Merge pull request #131 from pete4abw/infofix
Fix lrzip info display when last chunk has no compression
2019-11-04 08:31:09 +11:00
Peter Hyman 785562a753 Fix lrzip info display when last chunk has no compression 2019-11-03 15:18:48 -06:00
Peter Hyman 8eb867e5f0 fix to allow compression in lrzip.conf to be overridden by command line choice. 2019-10-27 11:17:46 -05:00
Peter Hyman 0906e3d099 lrztar -o fix 2019-06-30 11:53:20 -05:00
Con Kolivas b922018128
Merge pull request #113 from pete4abw/master
update to lrzip.conf.5 manpage and example file.
2019-06-19 20:44:20 +10:00
Peter Hyman 2f012cb3ea Fix to allow override of compression set in lrzip.conf 2019-06-19 05:36:21 -05:00
Peter Hyman 67ddcae772 Merge branch 'master' of https://github.com/ckolivas/lrzip 2019-05-30 06:46:16 -05:00
Con Kolivas edb357ecde
Merge pull request #114 from danieldjewell/master
Fix Android Detection in lrzip_private.h
2019-05-28 13:50:05 +10:00
Daniel Jewell a8f0dc3a31 Fix Android Detection in lrzip_private.h
lrzip_private.h was checking for "ANDROID" but
it should be __ANDROID__

lrzip now compiles just fine on android, it seems
2019-05-27 20:34:50 -07:00
Peter Hyman b1b5f81d81 update to lrzip.conf.5 manpage and example file. 2019-05-12 12:35:13 -05:00
Con Kolivas 79f505165b
Merge pull request #106 from areading/ar/thread_race_segfault
Fix thread race causing segfault during decompression
2019-02-24 17:14:54 +11:00
Andrew Reading c2714b9eab Compile with -pthread instead of just -lpthread.
In Linux, GCC appears to process -pthread as '-D_REENTRANT -lpthread'.
Just in case the _REENTRANT still does something useful on a target
platform, this commit adds this missing -pthread flag during
compilation.
2019-02-23 21:15:38 -08:00
Andrew Reading 8eba9a202e Make threaded decompression more robust on failure.
This changes the decompression worker thread to signal the main thread
in case of failure, allowing the main thread to handle this
appropriately instead of just assuming the resulting data is always good.
2019-02-23 21:09:44 -08:00
Andrew Reading 1a1723834b Fix segfault from thread race condition during decompression.
This fixes an issue where the main thread would not wait for all worker
threads to fully join before attempting to process their result buffers:
new_thread was true up until to the final N-1 calls, at which point the
input stream will have ended and new_thread would be false, then
bypassing the pthread_join()s.

The new_thread condition isn't actually necessary at all, so it has been
entirely removed.
2019-02-23 21:01:24 -08:00
Con Kolivas 9819e861a5
Merge pull request #101 from emallickhossain/patch-1
Fix tar cowardly failing
2018-09-18 22:19:02 +10:00
Mallick Hossain de08f0ef40
Fix tar cowardly failing
Since .tar archive was not specified, compression was failing.
2018-09-13 09:36:24 -04:00
Con Kolivas a81248e47d Cope with corrupt/crafted archive stream overruns. 2018-05-28 15:06:04 +10:00
Con Kolivas 3cadc63e39 Minor memleak clean ups on failures. 2018-05-28 14:39:26 +10:00
Con Kolivas 907b66b8cb Check for invalid expected sizes and abort. 2018-05-25 13:12:54 +10:00
Con Kolivas ed51e14a4b Fix lrztar error when no arguments given. 2018-05-22 14:06:11 +10:00
Con Kolivas cd456aa70e Fix failure to pthread join on corrupt archives calling fill_buffer again at the end of a stream. 2018-05-18 14:29:44 +10:00
Con Kolivas 399336eba4 Check for invalid last_head entries, avoiding infinite loops. 2018-05-17 15:21:40 +10:00
Con Kolivas 257186a865 Fix zero sized archive decompression. 2018-05-17 15:06:31 +10:00
Con Kolivas 95688b0833 Silence tiny leak warning. 2018-05-17 14:38:12 +10:00
Con Kolivas d9aea489b9 Silence possibly inadequate space warning with -f and -q options. 2018-05-16 19:28:43 +10:00
Con Kolivas 50cfb3b9f6 Prevent infinite loop from crafted/corrupt archive in unzip_match. 2018-05-16 19:26:15 +10:00
Con Kolivas b84c710902 Prevent infinite loop in runzip_fd with crafted/damaged archive. 2018-05-16 19:14:56 +10:00
Con Kolivas 07bb66e284 Clean up error warnings. 2018-05-16 19:07:29 +10:00
Con Kolivas 7123f5545b Add more sanity checks for chunk data. 2018-05-16 17:20:26 +10:00
Con Kolivas f12c4a35f9 Add sanity checking for chunk data in the file header, fixing stack overflow. 2018-05-16 17:12:50 +10:00
Con Kolivas 4893e869e3 Add sanity check for invalid values during decompression, addressing CVE-2017-8845. 2018-05-16 16:55:41 +10:00
Con Kolivas 89d7b33e6a Add sanity checking on chunk data on decompression. 2018-05-16 16:51:03 +10:00
Con Kolivas 33a6bf6234 Add invalid chunk data testing in info mode. 2018-05-16 16:44:50 +10:00
Con Kolivas 3f375385a5 Avoid crash from corrupt archive reading matches beyond end of stream. 2018-05-16 16:30:54 +10:00
Con Kolivas 1cf4460412 Missed one decomp clean up. 2018-05-16 15:13:55 +10:00
Con Kolivas a94aeb7503 Further s_buf dealloc fixes on failed decompression. 2018-05-16 14:35:06 +10:00