Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8303669

SelectVersion indexes past the end of the argv array

XMLWordPrintable

    • b24
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      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.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I've reproduced the issue using the appbundler launcher https://github.com/TheInfiniteKind/appbundler which calls the JLI_Launch function directly and passes in a valid argc and argv, however the argv array is exactly the right length and not null terminated. Providing an odd-numbered number of options (ie. -something) triggers the crash.


      FREQUENCY : always


            asotona Adam Sotona
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: