prevent OOM when cataloguing some RAW files
This commit is contained in:
parent
0f9fc2881a
commit
98c39c2e7b
1 changed files with 5 additions and 0 deletions
|
@ -6808,6 +6808,11 @@ public class ExifInterfaceFork {
|
|||
}
|
||||
firstIfdOffset -= 8;
|
||||
if (firstIfdOffset > 0) {
|
||||
// TLAD start
|
||||
if (firstIfdOffset > ATTRIBUTE_SIZE_DANGER_THRESHOLD) {
|
||||
throw new IOException("dangerous IFD offset=" + firstIfdOffset);
|
||||
}
|
||||
// TLAD end
|
||||
dataInputStream.skipFully(firstIfdOffset);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue