On Wed, 3 May 2023 12:03:34 GMT, Adam Sotona <asot...@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 This pull request has now been integrated. Changeset: fa143148 Author: Adam Sotona <asot...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/fa14314853e161c6ca5561be3e1e280691d8fe99 Stats: 10 lines in 3 files changed: 6 ins; 0 del; 4 mod 8303669: SelectVersion indexes past the end of the argv array Reviewed-by: vromero ------------- PR: https://git.openjdk.org/jdk/pull/13775