From 7d6a23090c88b7dc065283897099e3421a1d5a33 Mon Sep 17 00:00:00 2001 From: joost Date: Tue, 2 Oct 2007 21:01:13 +0000 Subject: [PATCH] * Terminate strings in recordbuffer if size of supplied string is larger then the field-size git-svn-id: trunk@8726 - --- packages/fcl-db/src/fields.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fcl-db/src/fields.inc b/packages/fcl-db/src/fields.inc index cd2a13ba51..6111ed5c87 100644 --- a/packages/fcl-db/src/fields.inc +++ b/packages/fcl-db/src/fields.inc @@ -1089,6 +1089,8 @@ begin // The data is copied into the buffer, since some TDataset descendents copy // the whole buffer-length in SetData. (See bug 8477) Buf := AValue; + // If length(AValue) > Datasize the buffer isn't terminated properly + Buf[DataSize] := #0; SetData(@Buf); end; end;