diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-06-27 19:59:16 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-06-27 19:59:16 (GMT) |
commit | 121fa374a9f7361dfc6b0c726943251da7df4d71 (patch) | |
tree | 30f5e7a6b6a28e068daa244ad3ef43c841688c24 /Source/cmMakefile.cxx | |
parent | d75a2f08617587ae244af2a2e900847cabfbeba1 (diff) | |
download | CMake-121fa374a9f7361dfc6b0c726943251da7df4d71.zip CMake-121fa374a9f7361dfc6b0c726943251da7df4d71.tar.gz CMake-121fa374a9f7361dfc6b0c726943251da7df4d71.tar.bz2 |
BUG: dont pass unverified char * to streams
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ba57c3e..6eeefca 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1401,8 +1401,10 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source, { cmOStringStream error; error << "Syntax error in cmake code at\n" - << filename << ":" << line << ":\n" - << parser.GetError() << ", when parsing string \"" << source.c_str() << "\""; + << (filename?filename:"(no filename given)") + << ":" << line << ":\n" + << parser.GetError() << ", when parsing string \"" + << source.c_str() << "\""; const char* versionValue = this->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY"); int major = 0; |