> 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 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13775/files - new: https://git.openjdk.org/jdk/pull/13775/files/2c46bb40..395cf2e7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13775&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13775&range=00-01 Stats: 8 lines in 2 files changed: 6 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/13775.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13775/head:pull/13775 PR: https://git.openjdk.org/jdk/pull/13775