mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:29:27 +02:00
Return -1 if size of file is smaller tham header size in tppufile.readheader method
git-svn-id: trunk@49476 -
This commit is contained in:
parent
aadcb00977
commit
4483343d00
@ -277,7 +277,7 @@ end;
|
||||
function tppufile.readheader: longint;
|
||||
begin
|
||||
if fsize<sizeof(tppuheader) then
|
||||
exit(0);
|
||||
exit(-1);
|
||||
result:=f.Read(header,sizeof(tppuheader));
|
||||
{ The header is always stored in little endian order }
|
||||
{ therefore swap if on a big endian machine }
|
||||
|
Loading…
Reference in New Issue
Block a user