Commit graph

166 commits

Author SHA1 Message Date
Ingo Brückl e816f1dece Do not use locale for info output
Also, remove all thousands separators from printf formats.
2022-03-08 14:19:24 +01:00
Con Kolivas d000920ff7 Update copyright dates for affected files. 2022-02-27 21:05:15 +11:00
Con Kolivas 1974d68407 Change -q to only silence progress as per documentation. 2022-02-27 18:35:10 +11:00
Con Kolivas ec926c62b2 Fix and tidy up clear_rulist. 2022-02-27 18:13:42 +11:00
Con Kolivas ec54339be6 Cleanup unused code. 2022-02-27 17:27:45 +11:00
Con Kolivas 09ceb85afa Fix stdout dumping to console when there is inadequate memory to compress in ram by properly using temporary files. 2022-02-26 15:14:52 +11:00
Con Kolivas c873e52ec2 Do not restrict any reads or writes to 1GB on 64bit. 2022-02-26 10:58:52 +11:00
Con Kolivas 4b3942103b Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure. 2022-02-26 10:11:49 +11:00
Con Kolivas 23407bc8f7 Revert "Fix control->suffix being deallocated as heap memory as reported by Pietro Borrello."
This reverts commit 5faf80cd53.

No longer needed without liblrzip.
2022-02-26 09:21:45 +11:00
Con Kolivas bf11a54b99 Remove check for MD5_RELIABLE as md5 is reported to be reliable on macos according to Peter Hyman. 2022-02-25 23:07:47 +11:00
Peter Hyman 06b1c08228 Pretty format info output. 2022-02-25 23:03:38 +11:00
Con Kolivas 5faf80cd53 Fix control->suffix being deallocated as heap memory as reported by Pietro Borrello. 2022-02-25 22:35:20 +11:00
Con Kolivas 562a643481 As pointed out by Peter Hyman Examining the output of max verbose lrzip -vvi revealed that the offset shown for stream 1 is incorrect. It uses the same offset as stream 0. This occurs for all chunks. 2021-11-16 22:07:13 +11:00
Con Kolivas c5e0df5cf9 Update copyright notices. 2021-02-16 14:20:06 +11:00
Con Kolivas 224a6306e9 Put a workaround to possibly read previously corrupted archives missing lzma properties. 2021-02-16 01:20:29 +11:00
Con Kolivas 590377819c Revert "Chunk size should not be zero."
This reverts commit a80c0b5e20.

Incorrect fix, needs reworking.
2021-02-16 01:10:01 +11:00
Con Kolivas a80c0b5e20 Chunk size should not be zero. 2021-02-14 11:20:53 +11:00
Peter Hyman 4b7301f435
Update lrzip.c
Offset always zero because of missing parenstheses.

OLD
Block   Comp    Percent Size
1       lzma    21.4%   22356255 / 104376320    Offset: 0       Head: 22356294
2       lzma    16.8%   17506482 / 104376320    Offset: 0       Head: 39862789
3       lzma    16.8%   17532322 / 104376320    Offset: 0       Head: 57395124

NEW
Block   Comp    Percent Size
1       lzma    21.4%   22356255 / 104376320    Offset: 56      Head: 22356294
2       lzma    16.8%   17506482 / 104376320    Offset: 22356324        Head: 39862789
3       lzma    16.8%   17532322 / 104376320    Offset: 39862819        Head: 57395124
2020-11-14 15:32:32 -06:00
Con Kolivas 8af8ad17e4 Fix error with failure to write with stdout due to different semantics with fwrite vs write. 2020-11-11 23:19:29 +11:00
Con Kolivas de2930dc0a
Revert "BUGFIX: lrzip -d, -t should allow a file with or without an lrz extension and add if necessary" 2020-06-01 13:16:39 +10:00
Peter Hyman f9b127cd5a BUGFIX: lrzip -d, -t should allow a file with or without an lrz extension and add it if necessary 2020-05-28 11:43:11 -05:00
Peter Hyman 785562a753 Fix lrzip info display when last chunk has no compression 2019-11-03 15:18:48 -06:00
Con Kolivas 907b66b8cb Check for invalid expected sizes and abort. 2018-05-25 13:12:54 +10:00
Con Kolivas 399336eba4 Check for invalid last_head entries, avoiding infinite loops. 2018-05-17 15:21:40 +10:00
Con Kolivas 95688b0833 Silence tiny leak warning. 2018-05-17 14:38:12 +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 33a6bf6234 Add invalid chunk data testing in info mode. 2018-05-16 16:44:50 +10:00
Con Kolivas d212cc1115 Use dealloc() wrapper to minimise risk of local use after free. 2018-05-16 14:12:22 +10:00
Con Kolivas 3b61d97233 Minor alloc cleanup. 2018-05-16 14:03:14 +10:00
Con Kolivas 74b735ab68 Fix misleading indentation. 2018-03-09 17:29:01 +11:00
Ingo Brückl 6b50431410 Enable specifying the passphrase as an argument to option 'encrypt'
For various use cases it is desirable to be able to specify the
passphrase for a password protected encryption on the command line.

So allow option 'encrypt' to have an optional argument and set
control->passphrase to this argument if it is given.

Read the passphrase (and prompt for it) only from standard input
if not given on the command line.

Additionally, update documentation.

This fixes github issue #72, reported by aivanise.
2018-03-09 15:48:33 +11:00
Tim Savannah 1510f4a26a Fix large memleak in decompression when output does not go to stdout. Same sort of logic already exists in compression. 2017-06-04 01:29:17 -04:00
Tim Savannah 6e0016daf7 Make liblrzip work when FILE provided is anything other than stdin. This will allow bindings to be created to lrzip 2017-06-04 01:28:18 -04:00
Con Kolivas 64afd02a7d Preserve times on compression 2016-10-17 21:36:13 +11:00
Con Kolivas 3d9b791214 Add a workaround in encryption loops calculation for CPUs no longer keeping up with Moore's law 2016-06-14 13:47:38 +10:00
Con Kolivas 32c7fa82a2 Tidy 2016-06-09 18:18:14 +10:00
Con Kolivas 73213b9796 Merge branch 'master' into compat 2016-06-09 15:01:44 +10:00
Con Kolivas 56a84987dd Update copyright dates 2016-06-09 11:16:41 +10:00
Con Kolivas c7a111bd32 Base temporary output buffer on maximum mallocable, not maxram 2016-06-09 10:51:55 +10:00
Con Kolivas fcb64e6dbb Do not fail if we are unable to write temporary files, giving a warning only that it might fail if we don't have enough ram 2015-04-16 16:38:20 +10:00
Con Kolivas 788a70e6f6 Try /tmp/ if none of the temporary environment directories or the current directory are writeable 2015-04-16 16:20:27 +10:00
Con Kolivas d7ebee9640 Style police 2015-04-16 15:47:31 +10:00
Con Kolivas 0005c1cd95 Fix false warning on decompressing from stdin without keep files 2015-04-16 15:31:23 +10:00
Con Kolivas 773df5436c Fix false warning on compressing from stdin without keep files 2015-04-16 15:28:01 +10:00
Con Kolivas 591e106d57 Don't show extra message in compat mode decompress 2015-04-16 15:22:43 +10:00
Peter Hyman 4a24a6dd10 Correct adding slash to control->tmpdir. off-by-one error. 2015-03-10 11:30:37 -07:00
Con Kolivas 3dbf13f92d Use PRId64 instead of lld in fscanf 2015-03-10 20:08:00 +11:00
Con Kolivas 2e3eed5d77 Fix ISO C warning in lrzip.c 2015-03-10 20:03:21 +11:00
Peter Hyman 9a3d2f887a control->tmpdir fixes 2015-03-09 20:36:19 -07:00