Marti2203 opened a new pull request, #848: URL: https://github.com/apache/commons-compress/pull/848
Fixes [COMPRESS-737](https://issues.apache.org/jira/browse/COMPRESS-737). `sanityCheckSubStreamsInfo()` advanced `folderIdx` inside a short-circuited condition, so after a folder with more than one substream it checked every later folder against the previous folder's CRC flag. The digest count came out wrong and a valid archive with folders [1 entry + folder CRC], [2 entries], [1 entry + folder CRC] was rejected with "Badly terminated SubStreamsInfo"; the same archive with the folders reordered opened. `readSubStreamsInfo()` already uses each folder's own flag. This advances the index once per folder. The new resource `COMPRESS-737.7z` (141 bytes, COPY, four 3-byte entries) is such an archive; 7-Zip (`7z t`) reports it as OK. `SevenZFileTest.testMixedFolderCrcs` fails without the change and passes with it; `SevenZFileTest` and `mvn -B -DskipTests -DskipITs` pass. This issue was found by an LLM-Enhanced Static Analysis Engine and verified manually. The patch and this description were prepared with AI assistance (Claude Code) and reviewed by me; the commit carries an `Assisted-By:` trailer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
