瀏覽代碼

HPCC-24757 wuget may core if archive resource is empty

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 4 年之前
父節點
當前提交
73c8feadd5
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      common/dllserver/thorplugin.cpp

+ 2 - 1
common/dllserver/thorplugin.cpp

@@ -666,7 +666,8 @@ extern DLLSERVER_API bool decompressResource(size32_t len, const void *data, Mem
 extern DLLSERVER_API bool decompressResource(size32_t len, const void *data, StringBuffer &result)
 {
     MemoryBuffer tgt;
-    decompressResource(len, data, tgt);
+    if (len)
+        decompressResource(len, data, tgt);
     tgt.append((char)0);
     unsigned expandedLen = tgt.length();
     result.setBuffer(expandedLen, reinterpret_cast<char *>(tgt.detach()), expandedLen-1);