diff options
author | Brad King <brad.king@kitware.com> | 2002-06-25 13:18:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-06-25 13:18:43 (GMT) |
commit | dae99c659d25f4a6be7f99df51a83186cb5aa155 (patch) | |
tree | abe49e053695de0bb266bd084cdd30a1002b269e | |
parent | eb5b8e3d248b91eda948d93e4bc8e83e341d1191 (diff) | |
download | CMake-dae99c659d25f4a6be7f99df51a83186cb5aa155.zip CMake-dae99c659d25f4a6be7f99df51a83186cb5aa155.tar.gz CMake-dae99c659d25f4a6be7f99df51a83186cb5aa155.tar.bz2 |
BUG: Result from ostrstream::str() can be a null pointer.
-rw-r--r-- | Source/cmStandardIncludes.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 802855c..224e196 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -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&); |