58e493f790
build stuff with system libraries, so we no longer have to repair curl/zlib... just xmlrpc which cmake can't find without help.
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
$OpenBSD: patch-Source_cmCPluginAPI_cxx,v 1.2 2006/12/18 16:04:31 espie Exp $
|
|
--- Source/cmCPluginAPI.cxx.orig Mon Dec 4 17:03:55 2006
|
|
+++ Source/cmCPluginAPI.cxx Sun Dec 17 11:07:03 2006
|
|
@@ -405,10 +405,11 @@ char CCONV *cmExpandVariablesInString(vo
|
|
mf->ExpandVariablesInString(barf,
|
|
(escapeQuotes ? true : false),
|
|
(atOnly ? true : false));
|
|
- char *res = static_cast<char *>(malloc(result.size() + 1));
|
|
+ size_t sz = result.size() + 1;
|
|
+ char *res = static_cast<char *>(malloc(sz));
|
|
if (result.size())
|
|
{
|
|
- strcpy(res,result.c_str());
|
|
+ strlcpy(res,result.c_str(), sz);
|
|
}
|
|
res[result.size()] = '\0';
|
|
return res;
|
|
@@ -581,24 +582,27 @@ void CCONV cmSourceFileSetName2(void *ar
|
|
char * CCONV cmGetFilenameWithoutExtension(const char *name)
|
|
{
|
|
std::string sres = cmSystemTools::GetFilenameWithoutExtension(name);
|
|
- char *result = (char *)malloc(sres.size()+1);
|
|
- strcpy(result,sres.c_str());
|
|
+ size_t sz = sres.size() + 1;
|
|
+ char *result = (char *)malloc(sz);
|
|
+ strlcpy(result,sres.c_str(), sz);
|
|
return result;
|
|
}
|
|
|
|
char * CCONV cmGetFilenamePath(const char *name)
|
|
{
|
|
std::string sres = cmSystemTools::GetFilenamePath(name);
|
|
- char *result = (char *)malloc(sres.size()+1);
|
|
- strcpy(result,sres.c_str());
|
|
+ size_t sz = sres.size() + 1;
|
|
+ char *result = (char *)malloc(sz);
|
|
+ strlcpy(result,sres.c_str(), sz);
|
|
return result;
|
|
}
|
|
|
|
char * CCONV cmCapitalized(const char *name)
|
|
{
|
|
std::string sres = cmSystemTools::Capitalized(name);
|
|
- char *result = (char *)malloc(sres.size()+1);
|
|
- strcpy(result,sres.c_str());
|
|
+ size_t sz = sres.size() + 1;
|
|
+ char *result = (char *)malloc(sz);
|
|
+ strlcpy(result,sres.c_str(), sz);
|
|
return result;
|
|
}
|
|
|