subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Binderman <dcb...@hotmail.com>
Subject JNIUtil.cpp:583: dangling pointer ?
Date Fri, 08 May 2015 09:52:38 GMT
Hello there,

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


#ifdef SVN_DEBUG
#ifndef SVN_ERR__TRACING
  if (err->file)
    {
      std::ostringstream buf;
      buf << err->file;
      if (err->line> 0)
        buf << ':' << err->line;
      source = buf.str().c_str();
    }
#endif
#endif

Luckily, it's only debug code, but you might want to fix it anyway.

Regards

David Binderman

 		 	   		  
Mime
View raw message