mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
BUG: Result from ostrstream::str() can be a null pointer.
This commit is contained in:
@@ -181,7 +181,8 @@ public:
|
||||
cmStrStreamCleanup cleanup(*this);
|
||||
cmStrStreamCleanup::IgnoreUnusedVariable(cleanup);
|
||||
int pcount = this->pcount();
|
||||
return std::string(this->Superclass::str(), pcount);
|
||||
const char* ptr = this->Superclass::str();
|
||||
return std::string(ptr?ptr:"", pcount);
|
||||
}
|
||||
private:
|
||||
cmStringStream(const cmStringStream&);
|
||||
|
||||
Reference in New Issue
Block a user