diff --git a/components/formats-bsd/src/loci/formats/tiff/TiffParser.java b/components/formats-bsd/src/loci/formats/tiff/TiffParser.java index 809bd5d3356..9658bfd21fa 100644 --- a/components/formats-bsd/src/loci/formats/tiff/TiffParser.java +++ b/components/formats-bsd/src/loci/formats/tiff/TiffParser.java @@ -546,6 +546,9 @@ public Object getIFDValue(TiffIFDEntry entry) throws IOException { offset &= 0xffffffffL; offset += 0x100000000L; } + if (offset >= in.length()) { + return null; + } in.seek(offset); }