Browse Source

* Fix for bug #21211, suggested by Dmitry Ukolov

git-svn-id: trunk@20228 -
michael 13 years ago
parent
commit
60e5411b7c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/fcl-web/src/base/custfcgi.pp

+ 4 - 1
packages/fcl-web/src/base/custfcgi.pp

@@ -302,8 +302,11 @@ var
 
   function GetString(ALength : integer) : string;
   begin
+    if (ALength<0) then
+      ALength:=0;
     SetLength(Result,ALength);
-    move(ARecord^.ContentData[i],Result[1],ALength);
+    if (ALength>0) then
+      move(ARecord^.ContentData[i],Result[1],ALength);
     inc(i,ALength);
   end;