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

getHBScriptCode script code validation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Introduced In Version:
      9
    • Resolved In Build:
      b127

      Description

      src/java.desktop/share/native/libfontmanager/scriptMapping.c has

      hb_script_t getHBScriptCode(int code) {
          if (code > MAX_ICU_SCRIPTCODE) {
              return HB_SCRIPT_INVALID;
          }

      Since 'code' will index an array, even though it is drawn from a limited set, it will be safer to ensure it is also >=0

        Attachments

          Activity

            People

            Assignee:
            prr Philip Race
            Reporter:
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: