🐛 Free the hue decode buffer on malformed data

This commit is contained in:
2026-11-15 22:06:51 +01:00
parent 13aae33a02
commit d41520eca4
+3
View File
@@ -103,6 +103,7 @@ begin
if AData <> nil then
begin
buffer := TMemoryStream.Create;
try
buffer.CopyFrom(AData, 88);
buffer.Position := 0;
for i := 0 to 31 do
@@ -113,8 +114,10 @@ begin
buffer.Read(FTableStart, SizeOf(Word));
buffer.Read(FTableEnd, SizeOf(Word));
buffer.Read(PChar(FName)^, 20);
finally
buffer.Free;
end;
end;
end;
function THue.GetName: string;