Fix partial read edge cases#969
Conversation
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
eslerm
left a comment
There was a problem hiding this comment.
Thank you for being thorough and applying to all archive types.
|
Confirmed that malcontent with this fix addresses the 'fake sections header' issue and also the failure to extract archives, as seen in wolfi-dev/os#54633 . |
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
|
The last commit here causes a failure when a zip archive (and possibly others) contains the same file both compressed and uncompressed. A simple zip file as attached demonstrates: |
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Thanks for pulling these out. I added a new test case that checks for this case. |
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
stevebeattie
left a comment
There was a problem hiding this comment.
Thanks for fixing the colliding file names issue. LGTM.
In certain cases, we were encountering partial reads which caused interesting scan results. This PR handles those edge cases and fixes partial reads in our optimized loops.
I ran several local scans with these changes and they address what I was seeing.