浏览代码

HPCC-10557 Fix potential buffer overrun

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
Gleb Aronsky 11 年之前
父节点
当前提交
061b64a5b0
共有 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;
   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);