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

Call to FcConfigAppFontAddFile uses wrong prototype, arguments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • jfx21
    • jfx20
    • javafx
    • b23
    • generic
    • generic

    Description

      This code

          225 if (text) {
          226 // rc = (jboolean)FcConfigAppFontAddFile(arg0, text);
          227 if (fp) {
          228 rc = (jboolean)((jboolean (*)(void *, const char *))fp)(arg0, text);
          229 }

      is problematic for two reasons: jboolean is unsigned char, but FcBool is int, and arg0 is jlong, not void *, as the prototype suggests. The latter leads to build failures with future compilers.

      The unsigned char/int difference may cause problems on certain platforms, depending on how the calling convention differ.

      Attachments

        Issue Links

          Activity

            People

              fweimer Florian Weimer
              fweimer Florian Weimer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: