diff --git a/components/formats-gpl/src/loci/formats/in/IvisionReader.java b/components/formats-gpl/src/loci/formats/in/IvisionReader.java index 4de6677c9d6..22b758de9b5 100644 --- a/components/formats-gpl/src/loci/formats/in/IvisionReader.java +++ b/components/formats-gpl/src/loci/formats/in/IvisionReader.java @@ -94,7 +94,12 @@ public boolean isThisType(RandomAccessInputStream stream) throws IOException { String version = stream.readString(3); try { Double.parseDouble(version); - return version.indexOf('.') != -1 && version.indexOf('-') == -1; + boolean validVersion = version.indexOf('.') != -1 && version.indexOf('-') == -1; + boolean validPatch = Character.isAlphabetic(stream.read()); + stream.skipBytes(1); + int dataType = stream.read(); + boolean validType = dataType >= 0 && dataType <= 8; + return validVersion && validPatch && validType; } catch (NumberFormatException e) { } return false;