diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-10-06 23:49:47 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-10-07 00:24:59 +0200 |
commit | 00ec79d1ad4d30c01d174d6cda608de59b3a201f (patch) | |
tree | 0f642659e4c8c9da3e864d2179258a23f5847847 /src/modules | |
parent | 56629ceb7e8db52003ae3c21a6c8b1da7bf508d7 (diff) |
m_spanningtree Fix undefined behavior caused by referencing the returned buffer by std::string::c_str() when the object is temporary
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 9e6c07425..5248ea897 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -34,8 +34,9 @@ */ void TreeSocket::DoBurst(TreeServer* s) { + std::string servername = s->GetName(); ServerInstance->SNO->WriteToSnoMask('l',"Bursting to \2%s\2 (Authentication: %s%s).", - s->GetName().c_str(), + servername.c_str(), capab->auth_fingerprint ? "SSL Fingerprint and " : "", capab->auth_challenge ? "challenge-response" : "plaintext password"); this->CleanNegotiationInfo(); |