summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-06-25 13:18:43 (GMT)
committerBrad King <brad.king@kitware.com>2002-06-25 13:18:43 (GMT)
commitdae99c659d25f4a6be7f99df51a83186cb5aa155 (patch)
treeabe49e053695de0bb266bd084cdd30a1002b269e /Source
parenteb5b8e3d248b91eda948d93e4bc8e83e341d1191 (diff)
downloadCMake-dae99c659d25f4a6be7f99df51a83186cb5aa155.zip
CMake-dae99c659d25f4a6be7f99df51a83186cb5aa155.tar.gz
CMake-dae99c659d25f4a6be7f99df51a83186cb5aa155.tar.bz2
BUG: Result from ostrstream::str() can be a null pointer.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmStandardIncludes.h3
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&);