소스 검색

* buffer overflow in ReadInputStream if a stream read> READ_BYTES (=64k) large. The overloaded tstream one is ok.

git-svn-id: trunk@48982 -
marco 4 년 전
부모
커밋
97b4cde077
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/fcl-process/src/processbody.inc

+ 1 - 1
packages/fcl-process/src/processbody.inc

@@ -492,7 +492,7 @@ begin
       begin
         if (BytesRead + available > DataLength) then
           begin
-            DataLength:=BytesRead + READ_BYTES;
+            DataLength:=BytesRead + max(READ_BYTES,available);
             Setlength(Data,DataLength);
           end;
         NumBytes := p.Read(data[1+BytesRead], Available);