Browse Source

* Terminate strings in recordbuffer if size of supplied string is larger then the field-size

git-svn-id: trunk@8726 -
joost 18 years ago
parent
commit
7d6a23090c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/fcl-db/src/fields.inc

+ 2 - 0
packages/fcl-db/src/fields.inc

@@ -1089,6 +1089,8 @@ begin
     // The data is copied into the buffer, since some TDataset descendents copy
     // The data is copied into the buffer, since some TDataset descendents copy
     // the whole buffer-length in SetData. (See bug 8477)
     // the whole buffer-length in SetData. (See bug 8477)
     Buf := AValue;
     Buf := AValue;
+    // If length(AValue) > Datasize the buffer isn't terminated properly
+    Buf[DataSize] := #0;
     SetData(@Buf);
     SetData(@Buf);
     end;
     end;
 end;
 end;