Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4764

subversion-1.10.2/subversion/bindings/javahl/native/JNIUtil.cpp:589]: (error) Dangerous usage of c_str()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: bindings_javahl
    • Labels:
      None

      Description

      subversion-1.10.2/subversion/bindings/javahl/native/JNIUtil.cpp:589]: (error) Dangerous usage of c_str(). The value returned by c_str() is invalid after this call.

       

      Source code is

      { std::ostringstream buf; buf << err->file; if (err->line > 0) buf << ':' << err->line; source = buf.str().c_str(); }

       

      source is left pointing at a random stack location.

       

        Attachments

          Activity

            People

            • Assignee:
              brane Branko Čibej
              Reporter:
              dcb David Binderman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: