mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 21:49:06 +02:00
fcld-db: dbase:
* Harden Visual FoxPro code: detect nil varbinary field source git-svn-id: trunk@26972 -
This commit is contained in:
parent
d0c93f4cd8
commit
3478ca4672
@ -2139,9 +2139,14 @@ begin
|
||||
'Q': //Visual FoxPro varbinary
|
||||
begin
|
||||
// copy data, and update varlength flag/varlength byte in field data
|
||||
Len := PWord(Src)^;
|
||||
if Len > FieldSize then
|
||||
Len := FieldSize;
|
||||
if Src = nil then
|
||||
Len := 0
|
||||
else
|
||||
begin
|
||||
Len := PWord(Src)^;
|
||||
if Len > FieldSize then
|
||||
Len := FieldSize;
|
||||
end;
|
||||
if Len < FieldSize then
|
||||
begin
|
||||
// Clear flag and store actual size byte in last data byte
|
||||
|
Loading…
Reference in New Issue
Block a user