mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-01 00:00:02 -04:00
Fix reading bad SubIFDs again
This commit is contained in:
+15
-4
@@ -105,16 +105,27 @@ public final class EXIFReader extends MetadataReader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < entryCount; i++) {
|
for (int i = 0; i < entryCount; i++) {
|
||||||
EXIFEntry entry = readEntry(pInput);
|
try {
|
||||||
|
EXIFEntry entry = readEntry(pInput);
|
||||||
|
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
entries.add(entry);
|
entries.add(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (IIOException e) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readLinked) {
|
if (readLinked) {
|
||||||
if (nextOffset == -1) {
|
if (nextOffset == -1) {
|
||||||
nextOffset = pInput.readUnsignedInt();
|
try {
|
||||||
|
nextOffset = pInput.readUnsignedInt();
|
||||||
|
}
|
||||||
|
catch (EOFException e) {
|
||||||
|
// catch EOF here as missing EOF marker
|
||||||
|
nextOffset = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read linked IFDs
|
// Read linked IFDs
|
||||||
|
|||||||
Reference in New Issue
Block a user