JavaStringBuffer class is unsafe

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 7
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: