* Merging revisions 1130,1138 from trunk:

------------------------------------------------------------------------
    r1130 | michael | 2021-04-04 11:28:37 +0200 (Sun, 04 Apr 2021) | 1 line
    
    * Fix ObjectBinaryToStream: read filer signature
    ------------------------------------------------------------------------
    r1138 | michael | 2021-04-05 15:37:50 +0200 (Mon, 05 Apr 2021) | 1 line
    
    * Undo latest change
    ------------------------------------------------------------------------
This commit is contained in:
michael 2021-04-14 11:32:44 +00:00
parent df27dfeed1
commit a6a5beb1fd

View File

@ -9998,14 +9998,18 @@ end;
procedure TObjectStreamConverter.Execute;
var
Signature: LongInt;
begin
if FIndent = '' then FInDent:=' ';
If Not Assigned(Input) then
raise EReadError.Create('Missing input stream');
If Not Assigned(Output) then
raise EReadError.Create('Missing output stream');
if Input.ReadDWord <> FilerSignatureInt then
raise EReadError.Create('Illegal stream image');
FInput.ReadBufferData(Signature);
if Signature <> FilerSignatureInt then
raise EReadError.Create(SInvalidImage);
ReadObject('');
end;