openbsd-ports/devel/cmake/patches/patch-Source_cmLocalUnixMakefileGenerator3_cxx

28 lines
1007 B
Plaintext
Raw Normal View History

2006-07-31 19:55:51 -04:00
$OpenBSD: patch-Source_cmLocalUnixMakefileGenerator3_cxx,v 1.2 2006/07/31 23:55:51 espie Exp $
--- Source/cmLocalUnixMakefileGenerator3.cxx.orig Mon Jul 31 16:49:57 2006
+++ Source/cmLocalUnixMakefileGenerator3.cxx Tue Aug 1 00:33:42 2006
@@ -1105,7 +1105,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";
@@ -1133,12 +1133,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)