fix: Reader proceeds to next volume when current one runs out of bytes#173
fix: Reader proceeds to next volume when current one runs out of bytes#173jaens wants to merge 1 commit intotwogood:mainfrom
Conversation
|
Do you have some .cab files that can be used as test cases? |
|
I wonder why the tests fail :( |
Can be avoided by restructuring all the surrounding code into nested
uhh... not sure if abandonware can be distributed as a test case?
I'll check them locally, might need even more extra checks to prevent infinite loops, in case something else runs out I guess. |
|
@jaens The existing test cases are pretty much based on abandonware... I need to check that they have not started to fail on main branch as well. |
|
All tests succeeded in #174 so I can't take in this PR in its current state. |
Currently, extracting IS5 CABs that split files over multiple volumes seems to fail with
bytes_to_read can't be zero, because the current volume runs out of bytes, meaningMIN(bytes_left, reader->volume_bytes_left)becomes 0 which always leads to an error inunshield_reader_read.Detect this condition and jump to opening the next volume. This is possibly related to #124 and #129, although it might not fix the latter.