소스 검색

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