Menu

#362 Fix for ARJ handling

None
closed-fixed
nobody
ARJ (1)
9
2022-03-19
2021-03-17
Valentine
No

Hello! Current version of 7-Zip incorrectly reads ARJ archives with extended headers shorter than 30 bytes.

7-Zip expects that all ARJ headers are 30 bytes (kBlockSizeMin) or longer.
But, according to ARJ "technote.txt", extended headers do not have predefined fields and therefore can be even 1 byte long (length + 1 byte + crc).
When 7-Zip encounters such header, it stops reading the archive.

The attached archive has 36 files, but current 7-Zip (v21) lists only 2 of them.

Referring to v19.0 (copy on github.com/kornelski/7z), the check is in file "ArjHandler.cpp", line 522:
if (_blockSize < kBlockSizeMin ||

To fix reading, the minimal length should only be checked for normal headers:
if ( (readSignature && (_blockSize < kBlockSizeMin)) ||

И спасибо за 7-Zip! :)

1 Attachments

Discussion

  • Igor Pavlov

    Igor Pavlov - 2021-03-18

    Ok. I'll fix it.
    Was that archive created with original arj software?

     
    • Valentine

      Valentine - 2021-03-18

      I don't know, this file is from Veit Kannegieser's site (https://kannegieser.net). Considering that this is a man who wrote Wise unpacker, I won't be surprised if he used some custom tools to make the archive.

      Official documentation does state that extended headers are "currently not used", but original ARJ reads this archive properly. And some other ARJ unpackers too.

       
  • Valentine

    Valentine - 2021-05-13

    Fixed in version 21.02, the archive reads as expected.
    Спасибо огромное! Thank you very much!

     
  • Super Sum

    Super Sum - 2022-03-19

    Can close now as now is v21.07 ?

     
    • Valentine

      Valentine - 2022-03-19

      @supersum, I'm not sure how to close it, the ticket seems to be manageable by @ipavlov.

       
  • Igor Pavlov

    Igor Pavlov - 2022-03-19
    • status: open --> closed-fixed
    • Group: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.