mirror of https://github.com/BOINC/boinc.git
VboxWrapper: prevent use after free in FloppyIOException
see http://blog.sensecodons.com/2013/04/dont-let-stdstringstreamstrcstr-happen.html for details fixes CID 34536 found by Coverity
This commit is contained in:
parent
155b35a3a2
commit
bbc4cf5751
|
@ -170,7 +170,8 @@ namespace FloppyIONS {
|
|||
virtual const char* what() const throw() {
|
||||
static std::ostringstream oss (std::ostringstream::out);
|
||||
oss << this->message << ". Error code = " << this->code;
|
||||
return oss.str().c_str();
|
||||
std::string tmp = oss.str();
|
||||
return tmp.c_str();
|
||||
}
|
||||
|
||||
// Change the message and return my instance
|
||||
|
|
Loading…
Reference in New Issue