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

19 lines
941 B
Plaintext
Raw Normal View History

$OpenBSD: patch-Source_cmDocumentation_cxx,v 1.2 2006/12/18 16:04:31 espie Exp $
--- Source/cmDocumentation.cxx.orig Mon Dec 4 17:03:55 2006
+++ Source/cmDocumentation.cxx Sun Dec 17 11:07:03 2006
@@ -336,11 +336,11 @@ bool cmDocumentation::CreateSingleModule
{
return false;
}
- char* pname = strcpy(new char[strlen(moduleName)+1], moduleName);
- char* ptext = strcpy(new char[text.length()+1], text.c_str());
+ char* pname = cmSystemTools::dupstring(moduleName);
+ char* ptext = cmSystemTools::dupstring(text.c_str());
this->ModuleStrings.push_back(pname);
this->ModuleStrings.push_back(ptext);
- char* pbrief = strcpy(new char[brief.length()+1], brief.c_str());
+ char* pbrief = cmSystemTools::dupstring(brief.c_str());
this->ModuleStrings.push_back(pbrief);
cmDocumentationEntry e = { pname, pbrief, ptext };
this->ModulesSection.push_back(e);