fcld-db: dbase:

* Harden Visual FoxPro code: detect nil varbinary field source

git-svn-id: trunk@26972 -
This commit is contained in:
reiniero 2014-03-06 15:09:38 +00:00
parent d0c93f4cd8
commit 3478ca4672

View File

@ -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