fpExif: Fix crash in images of YUNEEC CGO3 camera due to empty IFD entries.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7964 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-01-17 11:10:46 +00:00
parent 478f009290
commit 0d703fb453

View File

@ -331,6 +331,13 @@ begin
exit;
end;
if (ifdRec.TagID = 0) and (ifdRec.DataType = 0) and (ifdRec.DataCount = 0) and (ifdRec.DataValue = 0) then
begin
// This is an empty IFD entry as found in images of the YUNEEC CGO3 camera
AStream.Position := AStream.Position + n;
Continue;
end;
ifdRec.TagID := FixEndian16(ifdRec.TagID);
ifdRec.DataType := FixEndian16(ifdRec.DataType);
if not (ifdRec.DataType in [1..ord(High(TTagType))]) then begin