浏览代码

Merge pull request #5237 from garonsky/HPCC-10557

HPCC-10557  Fix potential buffer overrun

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 11 年之前
父节点
当前提交
e48af53d29
共有 1 个文件被更改,包括 1 次插入3 次删除
  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;
   bool bError = false;
   StringBuffer errMsg;
   StringBuffer errMsg;
 
 
-  char targetName[255] = "";
   iterComp->first();
   iterComp->first();
-  strncpy(targetName, iterComp->query().queryProp("@target"), 255);  //get the copy target configuration file name
 
 
   StringBuffer filePath;
   StringBuffer filePath;
-  CWsDeployFileInfo::setFilePath(filePath, targetName);
+  CWsDeployFileInfo::setFilePath(filePath, iterComp->query().queryProp("@target"));
 
 
   Owned<CWsDeployFileInfo> fi = new CWsDeployFileInfo(m_pService, filePath, false);
   Owned<CWsDeployFileInfo> fi = new CWsDeployFileInfo(m_pService, filePath, false);