I use the p7zip to unrar the rar file and I received a coredump at result.
example:
➜ libp7zip ✗ unrar l archive/res.rar
UNRAR 5.01 freeware Copyright (c) 1993-2013 Alexander Roshal
Archive: archive/res.rar
Details: RAR 4
Attributes Size Date Time Name
-rw-r--r-- 161100 19-09-19 13:10 24807202_1.html
-rw-r--r-- 264 02-07-18 10:19 readme.txt
-rw-r--r-- 410 19-09-19 19:44 031849971.gif
I used the NULL password to unarchive to handle this archive. Theoretically it works normally ,and it tells me that I use the wrong password. But it caused the coredump.
with assistance of the gdb,I know something about the wrong function call.
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=zh_CN.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs x64)
Scanning the drive for archives:
1 file, 56598 bytes (56 KiB)
Path = archive/res.rar
Type = Rar
Physical Size = 56598
Solid = -
Blocks = 3
Multivolume = -
Volumes = 1
Enter password (will not be echoed):
/usr/local/bin/7z: 行 2: 4703 段错误 "/usr/local/lib/p7zip/7z" "$@"
#0 0x00007fffefe3326f in NCompress::NRar2::CDecoder::ReadTables() () from /usr/lib64/Codecs/Rar.so
#1 0x00007fffefe34a72 in NCompress::NRar2::CDecoder::CodeReal(ISequentialInStream*, ISequentialOutStream*, unsigned long long const*, unsigned long long const*, ICompressProgressInfo*) ()
from /usr/lib64/Codecs/Rar.so
#2 0x00007fffefe34bde in NCompress::NRar2::CDecoder::Code(ISequentialInStream*, ISequentialOutStream*, unsigned long long const*, unsigned long long const*, ICompressProgressInfo*) ()
from /usr/lib64/Codecs/Rar.so
#3 0x00007ffff0180cc6 in NArchive::NRar::CHandler::Extract(unsigned int const*, unsigned int, int, IArchiveExtractCallback*) () from /lib64/7z.so
#4 0x00000000004b4c70 in C7ZipArchiveImpl::Extract (this=0x727be0, pArchiveItem=0x728b20, pOutStream=0x7fffffffd500)
the p7zip version is 16.02 ,the lasttest version of p7zip. so i don't know how to fix the bug, but i use the true password to unarchive the archive, it works normally.
Please write exact command with failure:
For example:
16.02 is old version.
Probably I've fixed these bugs in main 7-Zip code.
p7zip was not updated.
now I use the c++ programs language to reslove the archive files(using 7z.so and Rar.so),how can I get the latest the version of p7zip source file?
the https://www.7-zip.org/download.html is latest ?
Last edit: SHINE SUN 2019-10-08