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

SystemDictionary::class_name_symbol has incorrect length check

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 8
    • hotspot
    • b13

      The code has:

      if ((int)strlen(name) > Symbol::max_length()) {

      when it should have

      if (strlen(name) > (size_t)Symbol::max_length()) {

      otherwise string lengths > INT_MAX will give a negative result and so fail the comparison and so not get caught as being too long.

            dholmes David Holmes
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: