Skip to content

Commit

Permalink
Mitigate bad ifd offset.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed Jan 10, 2024
1 parent c4a8783 commit b595362
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/src/exif/exif_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,12 @@ class ExifData extends IfdContainer {
directories['ifd$index'] = directory;
index++;

ifdOffset = block.readUint32();
final nextIfdOffset = block.readUint32();
if (nextIfdOffset == ifdOffset) {
break;
} else {
ifdOffset = nextIfdOffset;
}
}

const subTags = {
Expand Down

0 comments on commit b595362

Please sign in to comment.