Skip to content
Snippets Groups Projects
Commit 5d8d22a5 authored by Jonas Walldn's avatar Jonas Walldn
Browse files

Fix broken detection of EXIF section when multiple 0xE1 app markers were

present in the file.
parent 27ee3f53
No related branches found
No related tags found
No related merge requests found
......@@ -1167,10 +1167,15 @@ mapping(string:mixed) get_properties(Stdio.File file, void|mapping tags)
default:
int size;
sscanf(file->read(2), "%2c", size);
if( marker==0xe1 && file->read(6) == "Exif\0\0" )
{
file = Stdio.FakeFile(file->read(size-2-6));
break loop;
if (marker == 0xe1) {
// There could be other app sections tagged with 0xE1, not just EXIF
if (file->read(6) == "Exif\0\0") {
file = Stdio.FakeFile(file->read(size - 2 - 6));
break loop;
} else {
// Undo last read
file->seek(file->tell() - 6);
}
}
file->read(size-2);
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment