RFR: 8303669: SelectVersion indexes past the end of the argv array [v2]
Vicente Romero
vromero at openjdk.org
Thu May 18 16:39:53 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
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13775#pullrequestreview-1433049710
More information about the core-libs-dev
mailing list