]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
14 years agoFix issue 168.
Michihiro NAKAJIMA [Fri, 19 Aug 2011 06:32:35 +0000 (02:32 -0400)] 
Fix issue 168.
Change the mechanism handling a rr_moved directory,
which is Rockridge extension that can exceed the limitation of
a maximum directory depth of ISO 9660.
  - Stop reading all entries at a time.
  - Connect "CL" entry to "RE" entry dynamically, which "CL" and "RE"
    have information to rebuild a full directory tree.
  - Tweak some related tests since we use Headsort for re-ordering
    entries and it cannot make a steady order when the keies of
    the entries are the same.

SVN-Revision: 3642

14 years agoFix build on VS2005.
Tim Kientzle [Fri, 19 Aug 2011 05:50:47 +0000 (01:50 -0400)] 
Fix build on VS2005.

SVN-Revision: 3641

14 years agoExplicit no argument function definitions. Some compiler complains about it.
Michihiro NAKAJIMA [Fri, 19 Aug 2011 03:32:01 +0000 (23:32 -0400)] 
Explicit no argument function definitions. Some compiler complains about it.

SVN-Revision: 3640

14 years agoCorrect a total number of file entries in test_read_format_iso_2.iso.Z.uu
Michihiro NAKAJIMA [Thu, 18 Aug 2011 15:39:55 +0000 (11:39 -0400)] 
Correct a total number of file entries in test_read_format_iso_2.iso.Z.uu

SVN-Revision: 3639

14 years agoFixup errors, distinguising between errors caused by bad RAR files, and unsupported...
Andres Mejia [Thu, 18 Aug 2011 00:44:05 +0000 (20:44 -0400)] 
Fixup errors, distinguising between errors caused by bad RAR files, and unsupported operations.

SVN-Revision: 3638

14 years agoFix memory access errors reading corrupted RAR file using LZSS compression.
Andres Mejia [Wed, 17 Aug 2011 23:44:54 +0000 (19:44 -0400)] 
Fix memory access errors reading corrupted RAR file using LZSS compression.

SVN-Revision: 3637

14 years agoTry to workaround the fact that zconf.h defines Byte also.
Tim Kientzle [Wed, 17 Aug 2011 06:11:16 +0000 (02:11 -0400)] 
Try to workaround the fact that zconf.h defines Byte also.

SVN-Revision: 3636

14 years agoFix screw-up with r3624. Thanks to Michihiro for pointing it out.
Tim Kientzle [Wed, 17 Aug 2011 06:06:45 +0000 (02:06 -0400)] 
Fix screw-up with r3624.  Thanks to Michihiro for pointing it out.

SVN-Revision: 3635

14 years agoMake sure to go back to previous directory after test run.
Andres Mejia [Wed, 17 Aug 2011 01:39:07 +0000 (21:39 -0400)] 
Make sure to go back to previous directory after test run.

SVN-Revision: 3633

14 years agoAdd test cases for improper use of -C.
Andres Mejia [Tue, 16 Aug 2011 23:38:02 +0000 (19:38 -0400)] 
Add test cases for improper use of -C.

SVN-Revision: 3632

14 years agoFix build failure with implicit declaration of bsdtar_warnc.
Andres Mejia [Tue, 16 Aug 2011 23:37:54 +0000 (19:37 -0400)] 
Fix build failure with implicit declaration of bsdtar_warnc.
grep did not reveal where bsdtar_warnc was defined, changed to using lafe_warnc.

SVN-Revision: 3631

14 years agoQuash compiler warnings by explicitly casting to unsigned on both sides
Colin Percival [Tue, 16 Aug 2011 19:10:25 +0000 (15:10 -0400)] 
Quash compiler warnings by explicitly casting to unsigned on both sides
of ? : expressions.

Pointy hat to: cperciva

SVN-Revision: 3630

14 years agoCanonicalize spelling of "less than or equal to": "<=", not "=<".
Colin Percival [Tue, 16 Aug 2011 18:07:34 +0000 (14:07 -0400)] 
Canonicalize spelling of "less than or equal to": "<=", not "=<".

Via: Tarsnap

SVN-Revision: 3629

14 years agoRemove unnecessary call to strlen; we already know how long this string is.
Colin Percival [Tue, 16 Aug 2011 18:04:19 +0000 (14:04 -0400)] 
Remove unnecessary call to strlen; we already know how long this string is.

Via: Tarsnap

SVN-Revision: 3628

14 years agoFix file flag setting on linux in the event that EXT2_IOC_GETFLAGS fails
Colin Percival [Tue, 16 Aug 2011 18:00:20 +0000 (14:00 -0400)] 
Fix file flag setting on linux in the event that EXT2_IOC_GETFLAGS fails
the first time we call it and then succeeds a few lines later; prior to
this commit this peculiar scenario would result in 'newflags' being used
uninitialized.

While I'm here, fix spelling ("implicity" -> "implicitly", "occured" ->
"occurred", "SECURE_SYMLINK" -> "SECURE_SYMLINKS"), grammar ("is a
unusable"), and writespace.

Via: Tarsnap

SVN-Revision: 3627

14 years agoRelax the bidder to accept images created by buggy FreeBSD/NetBSD
Tim Kientzle [Tue, 16 Aug 2011 06:01:47 +0000 (02:01 -0400)] 
Relax the bidder to accept images created by buggy FreeBSD/NetBSD
"makefs" program.

SVN-Revision: 3625

14 years agoThe old "compression" terminology will be retired in libarchive 4.0.
Tim Kientzle [Tue, 16 Aug 2011 05:50:12 +0000 (01:50 -0400)] 
The old "compression" terminology will be retired in libarchive 4.0.
Make this automatic and document it correctly.

SVN-Revision: 3624

14 years agoSquawk if we read '-C' '' from consecutive lines.
Colin Percival [Tue, 16 Aug 2011 05:32:31 +0000 (01:32 -0400)] 
Squawk if we read '-C' '' from consecutive lines.

Via: Tarsnap

SVN-Revision: 3623

14 years agomemcpy(new_str, NULL, 0) is _technically_ undefined behaviour under C99;
Colin Percival [Tue, 16 Aug 2011 05:26:58 +0000 (01:26 -0400)] 
memcpy(new_str, NULL, 0) is _technically_ undefined behaviour under C99;
it's hard to imagine this actually being compiled "wrong", but avoid it
anyway.

Via: Tarsnap

SVN-Revision: 3622

14 years ago-C '' is meaningless; complain and die if we are given it.
Colin Percival [Tue, 16 Aug 2011 05:23:49 +0000 (01:23 -0400)] 
-C '' is meaningless; complain and die if we are given it.

Via: Tarsnap

SVN-Revision: 3621

14 years agoSpelling: similiar -> similar.
Colin Percival [Tue, 16 Aug 2011 05:21:00 +0000 (01:21 -0400)] 
Spelling: similiar -> similar.
Grammar: continue ... and stopped -> continue ... and stop.

Via: Tarsnap

SVN-Revision: 3620

14 years agoReference the correct file name.
Colin Percival [Tue, 16 Aug 2011 05:18:26 +0000 (01:18 -0400)] 
Reference the correct file name.

Via: Tarsnap

SVN-Revision: 3619

14 years agoFix whitespace.
Colin Percival [Tue, 16 Aug 2011 05:12:12 +0000 (01:12 -0400)] 
Fix whitespace.

Via: Tarsnap

SVN-Revision: 3618

14 years agoDelete unused "cur_offset" field.
Colin Percival [Tue, 16 Aug 2011 05:08:37 +0000 (01:08 -0400)] 
Delete unused "cur_offset" field.

Via: Tarsnap

SVN-Revision: 3617

14 years agoUpdate comment: pformat_data went away years ago.
Colin Percival [Tue, 16 Aug 2011 04:43:23 +0000 (00:43 -0400)] 
Update comment: pformat_data went away years ago.

Via: Tarsnap

SVN-Revision: 3615

14 years agoTypos in comments: "a archive" -> "an archive", "formts" -> "formats",
Colin Percival [Tue, 16 Aug 2011 04:38:43 +0000 (00:38 -0400)] 
Typos in comments: "a archive" -> "an archive", "formts" -> "formats",
"noone" -> "no one", "we where" -> "we were", "ar_size filed" -> "ar_size
field", "furtunately" -> "fortunately", "explicity" -> "explicitly",
"noticably" -> "noticeably".

Delete whitespace before a comma.

archive_read_header is called archive_read_next_header.
archive_entry_link_resolver_free is called archive_entry_linkresolver_free.

Via: Tarsnap

SVN-Revision: 3614

14 years agoError out of copy_data if get_extract fails.
Colin Percival [Tue, 16 Aug 2011 04:34:41 +0000 (00:34 -0400)] 
Error out of copy_data if get_extract fails.

While I'm here, fix some whitespace.

Via: Tarsnap

SVN-Revision: 3613

14 years agoDon't leak memory if realloc fails.
Colin Percival [Tue, 16 Aug 2011 04:30:48 +0000 (00:30 -0400)] 
Don't leak memory if realloc fails.

Via: Tarsnap

SVN-Revision: 3612

14 years agoCorrect indentation.
Colin Percival [Tue, 16 Aug 2011 04:29:29 +0000 (00:29 -0400)] 
Correct indentation.

Via: Tarsnap

SVN-Revision: 3611

14 years agoAdd missing \n to debug printf.
Colin Percival [Tue, 16 Aug 2011 04:28:47 +0000 (00:28 -0400)] 
Add missing \n to debug printf.

Via: Tarsnap

SVN-Revision: 3610

14 years agoPassing -C '' to tar is meaningless; complain about it.
Colin Percival [Tue, 16 Aug 2011 04:27:03 +0000 (00:27 -0400)] 
Passing -C '' to tar is meaningless; complain about it.

Via: Tarsnap

SVN-Revision: 3609

14 years agoFix grammar: it's -> its.
Colin Percival [Tue, 16 Aug 2011 04:25:32 +0000 (00:25 -0400)] 
Fix grammar: it's -> its.

Via: Tarsnap

SVN-Revision: 3608

14 years agoFix typo: arc -> argc.
Colin Percival [Tue, 16 Aug 2011 04:24:52 +0000 (00:24 -0400)] 
Fix typo: arc -> argc.

Via: Tarsnap

SVN-Revision: 3607

14 years agoFix build failure on Visual Studio.
Andres Mejia [Mon, 15 Aug 2011 23:41:33 +0000 (19:41 -0400)] 
Fix build failure on Visual Studio.

SVN-Revision: 3606

14 years agoAdd a test to check whether ISO images that interleave files and
Tim Kientzle [Mon, 15 Aug 2011 04:29:25 +0000 (00:29 -0400)] 
Add a test to check whether ISO images that interleave files and
directories can be properly read.
Currently, the ISO reader fails this test.

SVN-Revision: 3605

14 years agoImprove crc32 in archive_crc32.h for its performance.
Michihiro NAKAJIMA [Mon, 15 Aug 2011 02:03:10 +0000 (22:03 -0400)] 
Improve crc32 in archive_crc32.h for its performance.
A use of expansion code can make crc32 fast about 20% -30%
in any gcc optimization option(-O0,-O1,-O2 and -O3).

SVN-Revision: 3604

14 years agoMinor improvement. Adopt the part of the changes in r3602 to increase
Michihiro NAKAJIMA [Mon, 15 Aug 2011 01:47:49 +0000 (21:47 -0400)] 
Minor improvement. Adopt the part of the changes in r3602 to increase
extraction speed.

SVN-Revision: 3603

14 years agoRework the handling of a copy of decode data in the lha reader.
Michihiro NAKAJIMA [Mon, 15 Aug 2011 01:40:37 +0000 (21:40 -0400)] 
Rework the handling of a copy of decode data in the lha reader.
This change improves extraction performance; this version is
10% faster than previous version.

SVN-Revision: 3602

14 years agoFixup bsdcpio_test so it can be called using relative paths to bsdcpio_test.
Andres Mejia [Sun, 14 Aug 2011 18:05:06 +0000 (14:05 -0400)] 
Fixup bsdcpio_test so it can be called using relative paths to bsdcpio_test.
Now calling ./bsdcpio_test will run all tests, similar to ./libarchive_test.

SVN-Revision: 3601

14 years agoFixup bsdtar_test so it can be called using relative paths to bsdtar_test.
Andres Mejia [Sun, 14 Aug 2011 17:53:21 +0000 (13:53 -0400)] 
Fixup bsdtar_test so it can be called using relative paths to bsdtar_test.
Now calling ./bsdtar_test will run all tests, similar to ./libarchive_test.

SVN-Revision: 3600

14 years agoUpdate pkgconfig file to return path to installed libarchive libs and headers.
Andres Mejia [Sat, 13 Aug 2011 18:52:38 +0000 (14:52 -0400)] 
Update pkgconfig file to return path to installed libarchive libs and headers.
Thanks to Jonathan Creekmore for this patch.

SVN-Revision: 3599

14 years agoFix passing a wrong variable to archive_string_conversion_charset_name.
Michihiro NAKAJIMA [Thu, 11 Aug 2011 09:49:00 +0000 (05:49 -0400)] 
Fix passing a wrong variable to archive_string_conversion_charset_name.

SVN-Revision: 3597

14 years agoMove the parser state into the bsdtar structure.
Tim Kientzle [Thu, 11 Aug 2011 05:54:09 +0000 (01:54 -0400)] 
Move the parser state into the bsdtar structure.

SVN-Revision: 3591

14 years agoBe a little more verbose about fundamental sanity failures.
Tim Kientzle [Thu, 11 Aug 2011 05:53:07 +0000 (01:53 -0400)] 
Be a little more verbose about fundamental sanity failures.

SVN-Revision: 3590

14 years agoIf FHD_UNICODE is set but no unicode data, that file name form is UTF-8.
Michihiro NAKAJIMA [Thu, 11 Aug 2011 05:05:38 +0000 (01:05 -0400)] 
If FHD_UNICODE is set but no unicode data, that file name form is UTF-8.

SVN-Revision: 3589

14 years agoThe size of a symlink file should be zero since it does not have its file data.
Michihiro NAKAJIMA [Thu, 11 Aug 2011 04:37:27 +0000 (00:37 -0400)] 
The size of a symlink file should be zero since it does not have its file data.
Fix related problems that the RAR reader returned ARCHIVE_FAILED
with an error message, "CRC error", when archive_read_data was called
on reading a symlink file.

SVN-Revision: 3588

14 years agoImprove the handling of a string conversion object in the RAR reader
Michihiro NAKAJIMA [Thu, 11 Aug 2011 03:00:32 +0000 (23:00 -0400)] 
Improve the handling of a string conversion object in the RAR reader
so as to correctly read symbolic-link filenames in multi-byte characters.

SVN-Revision: 3587

14 years agoModify r3575. Do not include zlib.h secretly in archive_crc32.h.
Michihiro NAKAJIMA [Wed, 10 Aug 2011 11:48:31 +0000 (07:48 -0400)] 
Modify r3575. Do not include zlib.h secretly in archive_crc32.h.

SVN-Revision: 3586

14 years agoFix a memory leak in the rar reader.
Michihiro NAKAJIMA [Wed, 10 Aug 2011 07:26:36 +0000 (03:26 -0400)] 
Fix a memory leak in the rar reader.
- Free mmpd7_contest before Ppmd7_Construct is called.
- Clean up the code calling Ppmd7_Free function to be surely called in any cases.

SVN-Revision: 3585

14 years agoFix memory leaks in the cab reader.
Michihiro NAKAJIMA [Wed, 10 Aug 2011 03:12:11 +0000 (23:12 -0400)] 
Fix memory leaks in the cab reader.

SVN-Revision: 3584

14 years agoFurther plug memory leaks made by reading a broken file.
Michihiro NAKAJIMA [Wed, 10 Aug 2011 02:56:36 +0000 (22:56 -0400)] 
Further plug memory leaks made by reading a broken file.

SVN-Revision: 3583

14 years agoPlug remaining memory leaks made by reading a broken file in the RAR reader.
Michihiro NAKAJIMA [Wed, 10 Aug 2011 02:36:59 +0000 (22:36 -0400)] 
Plug remaining memory leaks made by reading a broken file in the RAR reader.

SVN-Revision: 3582

14 years agoPlug memory leaks in the RAR reader.
Michihiro NAKAJIMA [Wed, 10 Aug 2011 02:25:07 +0000 (22:25 -0400)] 
Plug memory leaks in the RAR reader.

SVN-Revision: 3581

14 years agoRemove redundant code about EOF in RAR reader.
Michihiro NAKAJIMA [Wed, 10 Aug 2011 01:41:32 +0000 (21:41 -0400)] 
Remove redundant code about EOF in RAR reader.

SVN-Revision: 3580

14 years agoDo not go on extracting ppmd after a ppmd context was freed.
Michihiro NAKAJIMA [Tue, 9 Aug 2011 16:03:36 +0000 (12:03 -0400)] 
Do not go on extracting ppmd after a ppmd context was freed.
This case happend when reading a broken RAR file.

SVN-Revision: 3579

14 years agoReduce L1,L2 cache miss in the rar reader.
Michihiro NAKAJIMA [Tue, 9 Aug 2011 14:23:21 +0000 (10:23 -0400)] 
Reduce L1,L2 cache miss in the rar reader.
A use of large memory(over 1M bytes) for an output buffer makes
a lot of cache misses, so we should eliminate it as possible as we can.

SVN-Revision: 3578

14 years agoReduce the sum of a calling of write system-call in extracting RAR file.
Michihiro NAKAJIMA [Tue, 9 Aug 2011 11:56:28 +0000 (07:56 -0400)] 
Reduce the sum of a calling of write system-call in extracting RAR file.
For example, extracting test_read_format_rar_ppmd_lzss_conversion.rar.uu:
The sum came down from 62947 to 60.

SVN-Revision: 3577

14 years agoImprove lzss_emit_match() to be faster than previous version.
Michihiro NAKAJIMA [Tue, 9 Aug 2011 08:06:39 +0000 (04:06 -0400)] 
Improve lzss_emit_match() to be faster than previous version.
This cahnge makes user CPU time less about 40% when extracting
test_read_format_rar_ppmd_lzss_conversion.rar.uu.
This idea from our lha reader.

SVN-Revision: 3576

14 years agoUse zlib's crc32 function if available.
Michihiro NAKAJIMA [Tue, 9 Aug 2011 06:15:32 +0000 (02:15 -0400)] 
Use zlib's crc32 function if available.

SVN-Revision: 3575

14 years agoImplement a CRC check of uncompressed data of a RAR file.
Michihiro NAKAJIMA [Tue, 9 Aug 2011 05:51:00 +0000 (01:51 -0400)] 
Implement a CRC check of uncompressed data of a RAR file.

SVN-Revision: 3574

14 years agoModify ppmd7 code to minimize symbols leaked into the global name space.
Andres Mejia [Tue, 9 Aug 2011 03:27:24 +0000 (23:27 -0400)] 
Modify ppmd7 code to minimize symbols leaked into the global name space.
Only one extra symbol is add, __archive_ppmd7_functions, which is a global
struct carrying function pointers to ppmd7 functions.

SVN-Revision: 3573

14 years agoDon't leak PPMD7_kExpEscape into global symbol space.
Andres Mejia [Tue, 9 Aug 2011 00:09:33 +0000 (20:09 -0400)] 
Don't leak PPMD7_kExpEscape into global symbol space.

SVN-Revision: 3572

14 years agoAdd proper locations where reference files can be found for bsdtar and bsdcpio tests.
Andres Mejia [Mon, 8 Aug 2011 23:30:33 +0000 (19:30 -0400)] 
Add proper locations where reference files can be found for bsdtar and bsdcpio tests.

SVN-Revision: 3571

14 years agoAdd missing reference test files for inclusion in tarball.
Andres Mejia [Mon, 8 Aug 2011 23:00:13 +0000 (19:00 -0400)] 
Add missing reference test files for inclusion in tarball.

SVN-Revision: 3570

14 years agoFix generation of tarball.
Andres Mejia [Mon, 8 Aug 2011 22:44:57 +0000 (18:44 -0400)] 
Fix generation of tarball.

SVN-Revision: 3569

14 years agoRename archive_ppmd*.h headers to archive_ppmd*private.h.
Andres Mejia [Mon, 8 Aug 2011 22:39:06 +0000 (18:39 -0400)] 
Rename archive_ppmd*.h headers to archive_ppmd*private.h.
Use private instead of internal as all other private headers end in private.h.

SVN-Revision: 3568

14 years agoProperly check a header CRC to avoid reading a broken header and extracting
Michihiro NAKAJIMA [Mon, 8 Aug 2011 15:07:42 +0000 (11:07 -0400)] 
Properly check a header CRC to avoid reading a broken header and extracting
file data based on its unreliable parameters such as a compressed size or
an uncompressed size.

SVN-Revision: 3567

14 years agoFix a part of r3559. Correct a condition of realloc() failure.
Michihiro NAKAJIMA [Mon, 8 Aug 2011 13:53:40 +0000 (09:53 -0400)] 
Fix a part of r3559. Correct a condition of realloc() failure.

SVN-Revision: 3566

14 years agoKill the possibility that a huffman table can be made in no available
Michihiro NAKAJIMA [Mon, 8 Aug 2011 12:45:13 +0000 (08:45 -0400)] 
Kill the possibility that a huffman table can be made in no available
bit lengths, which happens only when reading a broken file.

SVN-Revision: 3565

14 years agoSanity check to a copy length of decoded data in order not to cause
Michihiro NAKAJIMA [Mon, 8 Aug 2011 11:08:54 +0000 (07:08 -0400)] 
Sanity check to a copy length of decoded data in order not to cause
a segmentation fault when reading a broken RAR file.

SVN-Revision: 3564

14 years agoAdd a check of remaining bits in the cache buffer of a bit reader;
Michihiro NAKAJIMA [Mon, 8 Aug 2011 08:57:33 +0000 (04:57 -0400)] 
Add a check of remaining bits in the cache buffer of a bit reader;
r3560 was not enough for several LHa files.

SVN-Revision: 3563

14 years agoGive __archive_read_ahead a correct header size. there was a problm when
Michihiro NAKAJIMA [Mon, 8 Aug 2011 08:24:22 +0000 (04:24 -0400)] 
Give __archive_read_ahead a correct header size. there was a problm when
reading a large size of lha archive file.

SVN-Revision: 3562

14 years agoFix a bug in lha reader. Give plenty bits to a pattern table.
Michihiro NAKAJIMA [Mon, 8 Aug 2011 08:15:09 +0000 (04:15 -0400)] 
Fix a bug in lha reader. Give plenty bits to a pattern table.
12 bits was too short for a bit length of the pattern table.

SVN-Revision: 3561

14 years agoFix a bug in lha reader. Correctly read remaining bits which are close to the end...
Michihiro NAKAJIMA [Mon, 8 Aug 2011 08:10:56 +0000 (04:10 -0400)] 
Fix a bug in lha reader. Correctly read remaining bits which are close to the end of data.

SVN-Revision: 3560

14 years agoProperly check the result of realloc() in order not to cause a segmentation faultwhen...
Michihiro NAKAJIMA [Mon, 8 Aug 2011 03:33:23 +0000 (23:33 -0400)] 
Properly check the result of realloc() in order not to cause a segmentation faultwhen reading a broken RAR file.

SVN-Revision: 3559

14 years agoendian.h and sys/endian.h, which I added to use in r3515, are no longer needed.
Michihiro NAKAJIMA [Mon, 8 Aug 2011 02:42:10 +0000 (22:42 -0400)] 
endian.h and sys/endian.h, which I added to use in r3515, are no longer needed.

SVN-Revision: 3558

14 years agoAdd basic test for rar file with binary data.
Andres Mejia [Mon, 8 Aug 2011 00:20:37 +0000 (20:20 -0400)] 
Add basic test for rar file with binary data.

SVN-Revision: 3557

14 years agoProvide better test for ppmd lzss conversions in RAR files.
Andres Mejia [Sun, 7 Aug 2011 22:14:31 +0000 (18:14 -0400)] 
Provide better test for ppmd lzss conversions in RAR files.
This would test fixes in r3555 and r3552.

SVN-Revision: 3556

14 years agoOnly call rar_br_preparation once.
Andres Mejia [Sun, 7 Aug 2011 21:55:23 +0000 (17:55 -0400)] 
Only call rar_br_preparation once.

SVN-Revision: 3555

14 years agoPartial merge of r2431 from trunk: Retry writes on EINTR.
Tim Kientzle [Sun, 7 Aug 2011 17:34:20 +0000 (13:34 -0400)] 
Partial merge of r2431 from trunk:  Retry writes on EINTR.
This should fix the SIGINT handler in bsdtar.
Note:  The rest of r2431 can't be merged, since it interacts
with a big write-side rearchitecture.

SVN-Revision: 3554

14 years agoMake sure amount of bits needed is read ahead.
Andres Mejia [Sun, 7 Aug 2011 17:21:17 +0000 (13:21 -0400)] 
Make sure amount of bits needed is read ahead.

SVN-Revision: 3553

14 years agoFix problem with reading RAR files that convert from lzss block to ppmd block.
Andres Mejia [Sun, 7 Aug 2011 16:05:47 +0000 (12:05 -0400)] 
Fix problem with reading RAR files that convert from lzss block to ppmd block.

SVN-Revision: 3552

14 years agoAdd a flag to check if PPMd is initialized in order not to cause
Michihiro NAKAJIMA [Sun, 7 Aug 2011 14:00:34 +0000 (10:00 -0400)] 
Add a flag to check if PPMd is initialized in order not to cause
a segmentation fault when reading a broken RAR file.

SVN-Revision: 3551

14 years agoEffectively read compressed data into a cache buffer of bit readers
Michihiro NAKAJIMA [Sun, 7 Aug 2011 08:07:26 +0000 (04:07 -0400)] 
Effectively read compressed data into a cache buffer of bit readers
without bytes-swap functions. A use of our byte-swap functions needed
extra bit shifts at bit readers.

SVN-Revision: 3550

14 years agoPlace source in proper alphabetical order.
Andres Mejia [Sun, 7 Aug 2011 03:46:16 +0000 (23:46 -0400)] 
Place source in proper alphabetical order.

SVN-Revision: 3549

14 years agoFix builds using cmake for new ppmd code added.
Andres Mejia [Sun, 7 Aug 2011 03:41:35 +0000 (23:41 -0400)] 
Fix builds using cmake for new ppmd code added.

SVN-Revision: 3548

14 years agoSupport conversions between ppmd blocks and lzss blocks.
Andres Mejia [Sun, 7 Aug 2011 03:24:29 +0000 (23:24 -0400)] 
Support conversions between ppmd blocks and lzss blocks.
This will enable support for large RAR files compressed using method "good" and
"best".

SVN-Revision: 3547

14 years agorar_br_read_ahead() must be invoked before using both rar_br_bits() and rar_br_consume().
Michihiro NAKAJIMA [Sun, 7 Aug 2011 01:45:52 +0000 (21:45 -0400)] 
rar_br_read_ahead() must be invoked before using both rar_br_bits() and rar_br_consume().

SVN-Revision: 3546

14 years agoThrow out a macro optimization for byte swap on x86 processor.
Michihiro NAKAJIMA [Sun, 7 Aug 2011 01:34:26 +0000 (21:34 -0400)] 
Throw out a macro optimization for byte swap on x86 processor.

SVN-Revision: 3545

14 years agoDon't use #pragma pack.
Andres Mejia [Sat, 6 Aug 2011 23:36:08 +0000 (19:36 -0400)] 
Don't use #pragma pack.

SVN-Revision: 3544

14 years agoImplement support for RAR files compressed using "best" and "good" method.
Andres Mejia [Sat, 6 Aug 2011 21:54:00 +0000 (17:54 -0400)] 
Implement support for RAR files compressed using "best" and "good" method.
PPMd code used is public domain code from p7zip. It seems 7z and RAR "good" and
"best" compressed files had a lot in common. Very little changes were needed
from original code so that it would work with RAR files and work with
libarchive. Currently, this will not work correctly with largefiles compressed
using PPMd.

SVN-Revision: 3543

14 years agoMerge r2516, r2536 from trunk: Allow path table offset values of
Tim Kientzle [Sat, 6 Aug 2011 17:53:51 +0000 (13:53 -0400)] 
Merge r2516, r2536 from trunk:  Allow path table offset values of
0 and 18, which are used by some ISO writers.

SVN-Revision: 3542

14 years agoBack to simply invoke lha_crc16(). Crrently the total cost of the
Michihiro NAKAJIMA [Sat, 6 Aug 2011 14:21:34 +0000 (10:21 -0400)] 
Back to simply invoke lha_crc16(). Crrently the total cost of the
calculation of CRC16 is almost the same as previous complex code,
so it is better that we make that code simple.

SVN-Revision: 3541

14 years agoBack out r3539. It was a wrong file I committed.
Michihiro NAKAJIMA [Sat, 6 Aug 2011 09:41:36 +0000 (05:41 -0400)] 
Back out r3539. It was a wrong file I committed.

SVN-Revision: 3540

14 years agoImprove a CRC16 calculation to be faster.
Michihiro NAKAJIMA [Sat, 6 Aug 2011 08:27:43 +0000 (04:27 -0400)] 
Improve a CRC16 calculation to be faster.

SVN-Revision: 3539

14 years agoIt would be better to return ARCHIVE_FAILED instead of ARCHIVE_FATAL
Michihiro NAKAJIMA [Fri, 5 Aug 2011 07:03:19 +0000 (03:03 -0400)] 
It would be better to return ARCHIVE_FAILED instead of ARCHIVE_FATAL
when there is something wrong in extracting RAR files, because
you may extract the next entry file in the RAR archive file.

SVN-Revision: 3538

14 years agoIf a extracted size is zero, return ARCHIVE_FAILED so as no to
Michihiro NAKAJIMA [Fri, 5 Aug 2011 05:46:43 +0000 (01:46 -0400)] 
If a extracted size is zero, return ARCHIVE_FAILED so as no to
cause a infinity loop in reading broken RAR files, which made by test_fuzz.

SVN-Revision: 3537

14 years agoBring a bit stream reader from our LHA reader.
Michihiro NAKAJIMA [Fri, 5 Aug 2011 02:46:50 +0000 (22:46 -0400)] 
Bring a bit stream reader from our LHA reader.
This is about 10% faster than previous version(r3535) in extracting RAR files.

SVN-Revision: 3536

14 years agoWe should use int64_t instead of off_t in libarchive 3.0 and later.
Michihiro NAKAJIMA [Thu, 4 Aug 2011 10:02:54 +0000 (06:02 -0400)] 
We should use int64_t instead of off_t in libarchive 3.0 and later.

SVN-Revision: 3535

14 years agoFix my silly typo in r3532.
Michihiro NAKAJIMA [Thu, 4 Aug 2011 03:38:56 +0000 (23:38 -0400)] 
Fix my silly typo in r3532.

SVN-Revision: 3533