2007-03-20 07:23:10 -04:00
|
|
|
$OpenBSD: patch-Source_cmTryRunCommand_cxx,v 1.3 2007/03/20 11:23:10 espie Exp $
|
|
|
|
--- Source/cmTryRunCommand.cxx.orig Wed Jan 10 18:59:13 2007
|
|
|
|
+++ Source/cmTryRunCommand.cxx Sun Mar 18 13:52:03 2007
|
|
|
|
@@ -140,11 +140,11 @@ bool cmTryRunCommand::InitialPass(std::vector<std::str
|
2006-07-20 05:23:13 -04:00
|
|
|
char retChar[1000];
|
|
|
|
if(worked)
|
|
|
|
{
|
|
|
|
- sprintf(retChar,"%i",retVal);
|
|
|
|
+ snprintf(retChar, sizeof retChar, "%i",retVal);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
- strcpy(retChar, "FAILED_TO_RUN");
|
|
|
|
+ strlcpy(retChar, "FAILED_TO_RUN", sizeof retChar);
|
|
|
|
}
|
|
|
|
this->Makefile->AddCacheDefinition(argv[0].c_str(), retChar,
|
|
|
|
"Result of TRY_RUN",
|