浏览代码

HPCC-16437 Fix wrong length passed to MessageBuffer.append

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 8 年之前
父节点
当前提交
5d4b4fc767
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      esp/services/ws_workunits/ws_workunitsHelpers.cpp

+ 4 - 1
esp/services/ws_workunits/ws_workunitsHelpers.cpp

@@ -1914,7 +1914,10 @@ void WsWuInfo::getWorkunitEclAgentLog(const char* fileName, const char* agentPid
     }
 
     if (buf.length() < 1)
-        buf.append(47, "(No logfile entries found for this workunit)");
+    {
+        const char * msg = "(No logfile entries found for this workunit)";
+        buf.append(strlen(msg), msg);
+    }
 }
 
 void WsWuInfo::getWorkunitThorLog(const char* fileName, MemoryBuffer& buf)