* use local buffer for seek mantis #38930 patch by Hendi.

git-svn-id: trunk@49490 -
This commit is contained in:
marco 2021-06-08 08:52:50 +00:00
parent 134bc7eb42
commit 09290da51e
2 changed files with 5 additions and 4 deletions

View File

@ -2554,7 +2554,7 @@ end;
procedure TIndexDef.SetDescFields(const AValue: string);
begin
if FDescFields=AValue then exit;
if AValue <> '' then FOptions:=FOptions + [ixDescending];
if AValue <> '' then FOptions[A:=FOptions + [ixDescending];
FDescFields:=AValue;
end;

View File

@ -325,6 +325,7 @@ end;
function Tdecompressionstream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
var c,off: int64;
buf: array[0..8191] of Byte;
begin
off:=Offset;
@ -344,9 +345,9 @@ begin
while off>0 do
begin
c:=off;
if c>bufsize then
c:=bufsize;
if read(Fbuffer^,c)<>c then
if c>SizeOf(buf) then
c:=SizeOf(buf);
if read(buf,c)<>c then
raise Edecompressionerror.create(Sseek_failed);
dec(off,c);
end;