Browse Source

Merge pull request #5237 from garonsky/HPCC-10557

HPCC-10557  Fix potential buffer overrun

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 11 years ago
parent
commit
e48af53d29
1 changed files with 1 additions and 3 deletions
  1. 1 3
      esp/services/WsDeploy/WsDeployService.cpp

+ 1 - 3
esp/services/WsDeploy/WsDeployService.cpp

@@ -4300,12 +4300,10 @@ bool CWsDeployFileInfo::handleComponentCopy(IPropertyTree *pComponents, IPropert
   bool bError = false;
   StringBuffer errMsg;
 
-  char targetName[255] = "";
   iterComp->first();
-  strncpy(targetName, iterComp->query().queryProp("@target"), 255);  //get the copy target configuration file name
 
   StringBuffer filePath;
-  CWsDeployFileInfo::setFilePath(filePath, targetName);
+  CWsDeployFileInfo::setFilePath(filePath, iterComp->query().queryProp("@target"));
 
   Owned<CWsDeployFileInfo> fi = new CWsDeployFileInfo(m_pService, filePath, false);