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

security native code doesn't always use malloc, realloc, and calloc correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8
    • Component/s: security-libs
    • Labels:
    • Resolved In Build:
      b84
    • Verification:
      Not verified

      Backports

        Description

        The return value of realloc must be checked to determine if the reallocation succeeded. The pointer to the original memory must be stored so that in the event that realloc fails, then the original memory can be freed.
        Also the return value of malloc (and calloc) must be checked for failure.

        The following files are effected:
        src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
        src/share/native/sun/security/jgss/wrapper/NativeUtil.c
        src/share/native/sun/security/smartcardio/pcsc.c
        src/solaris/native/com/sun/security/auth/module/Solaris.c
        src/solaris/native/com/sun/security/auth/module/Unix.c

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jzavgren John Zavgren (Inactive)
                Reporter:
                jzavgren John Zavgren (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: