SystemDictionary::class_name_symbol has incorrect length check

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: 8
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: