RFR: 8303669: SelectVersion indexes past the end of the argv array [v2]
Adam Sotona
asotona at openjdk.org
Fri May 19 08:12:58 UTC 2023
On Thu, 4 May 2023 09:17:05 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> libjli/java.c's SelectVersion method receives argc and argv but ignores argc in some circumstances an instead checks if *argv == 0 in its while loop, which results in a segmentation fault if the provided array is not NULL terminated.
>>
>> This patch counts down argc in the while loops instead of looking for zero termination.
>>
>> Please review.
>>
>> Thank you,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>
> added test
Thank you.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13775#issuecomment-1554205049
More information about the core-libs-dev
mailing list