🐛 Free the client statics decode buffer on malformed data
This commit is contained in:
@@ -523,6 +523,7 @@ begin
|
||||
begin
|
||||
AData.Position := AIndex.Lookup;
|
||||
block := TMemoryStream.Create;
|
||||
try
|
||||
block.CopyFrom(AData, AIndex.Size);
|
||||
block.Position := 0;
|
||||
for i := 1 to (AIndex.Size div 7) do
|
||||
@@ -530,9 +531,11 @@ begin
|
||||
item := TStaticItem.Create(Self, block, AX, AY);
|
||||
Cells[(item.Y mod 8) * 8 + (item.X mod 8)].Add(item);
|
||||
end;
|
||||
finally
|
||||
block.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TSeperatedStaticBlock.Create(AData: TStream; AIndex: TGenericIndex);
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user