瀏覽代碼

Merge pull request #13192 from ghalliday/issue23178

HPCC-23178 Fix Thor memcpy of a 0 length item with nullptr as target

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 年之前
父節點
當前提交
1a94a9277f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      thorlcr/graph/thgraphmaster.cpp

+ 1 - 1
thorlcr/graph/thgraphmaster.cpp

@@ -1054,7 +1054,7 @@ public:
             r->getResultUnicode(MemoryBuffer2IDataVal(result));
             tlen = result.length()/2;
             tgt = (UChar *)malloc(tlen*2);
-            memcpy(tgt, result.toByteArray(), tlen*2);
+            memcpy_iflen(tgt, result.toByteArray(), tlen*2);
         );
     }
     virtual char * getResultVarString(const char * stepname, unsigned sequence) override