31 lines
1.4 KiB
Plaintext
31 lines
1.4 KiB
Plaintext
$OpenBSD: patch-Source_cmake_cxx,v 1.6 2008/01/26 21:26:32 espie Exp $
|
|
--- Source/cmake.cxx.orig Mon Jan 21 19:59:52 2008
|
|
+++ Source/cmake.cxx Sat Jan 26 20:47:18 2008
|
|
@@ -1532,7 +1532,7 @@ int cmake::Configure()
|
|
if(!this->CacheManager->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
|
|
{
|
|
char ver[256];
|
|
- sprintf(ver,"%i.%i",cmMakefile::GetMajorVersion(),
|
|
+ snprintf(ver, sizeof ver, "%i.%i",cmMakefile::GetMajorVersion(),
|
|
cmMakefile::GetMinorVersion());
|
|
this->CacheManager->AddCacheEntry
|
|
("CMAKE_BACKWARDS_COMPATIBILITY",ver,
|
|
@@ -1897,7 +1897,7 @@ int cmake::DumpDocumentationToFile(std::ostream& f)
|
|
const char *terse;
|
|
const char *full;
|
|
char tmp[1024];
|
|
- sprintf(tmp,"Version %d.%d (%s)", cmake::GetMajorVersion(),
|
|
+ snprintf(tmp, sizeof tmp, "Version %d.%d (%s)", cmake::GetMajorVersion(),
|
|
cmake::GetMinorVersion(), cmVersion::GetReleaseVersion().c_str());
|
|
f << "<html>\n";
|
|
f << "<h1>Documentation for commands of CMake " << tmp << "</h1>\n";
|
|
@@ -2008,7 +2008,7 @@ int cmake::LoadCache()
|
|
if(!this->CacheManager->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
|
|
{
|
|
char ver[256];
|
|
- sprintf(ver,"%i.%i",cmMakefile::GetMajorVersion(),
|
|
+ snprintf(ver, sizeof ver, "%i.%i",cmMakefile::GetMajorVersion(),
|
|
cmMakefile::GetMinorVersion());
|
|
this->CacheManager->AddCacheEntry
|
|
("CMAKE_BACKWARDS_COMPATIBILITY",ver,
|