diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-30 16:22:48 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-30 16:22:48 (GMT) |
commit | 7aef92391b4ec5a23efbe03723a19dbeba8f71db (patch) | |
tree | d358ff55c2dcbf97986818fbf9d9ea4b302c13cc /Source/CPack/cmCPackTarCompressGenerator.cxx | |
parent | 4400842135799bee8bff35ce455ef3d88680d640 (diff) | |
download | CMake-7aef92391b4ec5a23efbe03723a19dbeba8f71db.zip CMake-7aef92391b4ec5a23efbe03723a19dbeba8f71db.tar.gz CMake-7aef92391b4ec5a23efbe03723a19dbeba8f71db.tar.bz2 |
ENH: make sure null const char* is not put into ossttringstream to avoid seg faults
Diffstat (limited to 'Source/CPack/cmCPackTarCompressGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackTarCompressGenerator.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx index 85b70ce..8192f70 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.cxx +++ b/Source/CPack/cmCPackTarCompressGenerator.cxx @@ -155,7 +155,8 @@ int cmCPackTarCompressGenerator::InitializeInternal() int cmCPackTarCompressGenerator::CompressFiles(const char* outFileName, const char* toplevel, const std::vector<std::string>& files) { - cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " << toplevel << std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " + << (toplevel ? toplevel : "(NULL)") << std::endl); cmCPackTarCompress_Data mydata(this); TAR *t; char buf[TAR_MAXPATHLEN]; |