Browse Source

Merge pull request #14194 from richardkchapman/wuget-core

HPCC-24757 wuget may core if archive resource is empty

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 4 years ago
parent
commit
4d3ac39359
1 changed files with 2 additions and 1 deletions
  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);