RFR: 8275846: read_base_archive_name() could read past the end of buffer [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Sat Nov 6 07:35:37 UTC 2021
On Sat, 6 Nov 2021 07:20:10 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Please review this small fix for an intermittent crash in `FileHeaderHelper::read_base_archive_name()`. The crash happens if a string stored inside a CDS dynamic archive is not zero-terminated.
>>
>> The fix is to check for zero-termination, and that the actual string length matches with the the recorded length.
>>
>> This fix was authored by @yqi in PR #5997 , but that PR may take longer to integrate than expected. So let's fix the crash first.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> Added new test case where base archive does not exist
Test looks good too.
-------------
Marked as reviewed by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6285
More information about the hotspot-runtime-dev
mailing list