openbsd-ports/devel/cmake/patches/patch-Source_cmLocalUnixMakefileGenerator3_cxx
2007-08-25 08:35:20 +00:00

28 lines
1007 B
Plaintext

$OpenBSD: patch-Source_cmLocalUnixMakefileGenerator3_cxx,v 1.4 2007/08/25 08:35:20 espie Exp $
--- Source/cmLocalUnixMakefileGenerator3.cxx.orig Mon Jul 16 23:12:31 2007
+++ Source/cmLocalUnixMakefileGenerator3.cxx Sun Aug 12 16:02:01 2007
@@ -1150,7 +1150,7 @@ cmLocalUnixMakefileGenerator3
while(this->ShortMakeVariableMap.count(ret) && ni < 1000)
{
++ni;
- sprintf(buffer, "%04d", ni);
+ snprintf(buffer, sizeof buffer, "%04d", ni);
ret = unmodified + buffer;
}
this->ShortMakeVariableMap[ret] = "1";
@@ -1178,12 +1178,12 @@ cmLocalUnixMakefileGenerator3
}
char buffer[5];
int ni = 0;
- sprintf(buffer, "%04d", ni);
+ snprintf(buffer, sizeof buffer, "%04d", ni);
ret = str1 + str2 + buffer;
while(this->ShortMakeVariableMap.count(ret) && ni < 1000)
{
++ni;
- sprintf(buffer, "%04d", ni);
+ snprintf(buffer, sizeof buffer, "%04d", ni);
ret = str1 + str2 + buffer;
}
if(ni == 1000)