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

JavaStringBuffer class is unsafe

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 7
    • client-libs
    • None
    • generic
    • generic

      The constructor JavaStringBuffer(JNIEnv *env, jstring text) (see src/windows/native/sun/windows/awt.h) assigns L"" constant value to the m_pStr data member if the text argument is NULL. However, the destructor of the class unconditionally free()'s the pointer. That may lead to a crash.

            anthony Anthony Petrov (Inactive)
            anthony Anthony Petrov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: