Browse Source

* 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 years ago
parent
commit
97b4cde077
1 changed files with 1 additions and 1 deletions
  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);