Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIFF: Continue validation even if data is unaligned #750

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,13 @@ protected List<IFD> parseIFDs(long offset, RepInfo info,
if ((next & 1) != 0) {
String mess = MessageFormat.format(MessageConstants.TIFF_HUL_59.getMessage(), next);
JhoveMessage message = JhoveMessages.getMessageInstance(MessageConstants.TIFF_HUL_59.getId(), mess);
throw new TiffException(message);

if (_byteOffsetIsValid) {
info.setMessage(new InfoMessage(message));
} else {
info.setMessage(new ErrorMessage(message));
info.setWellFormed(false);
}
}
if (list.size() > 50) {
throw new TiffException(MessageConstants.TIFF_HUL_60);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ public long parse(boolean byteOffsetIsValid)
_info.setMessage(new InfoMessage(message, _offset + 10 + 12*i));
}
else {
throw new TiffException(message,_offset + 10 + 12*i);
_info.setMessage(new ErrorMessage(message, _offset + 10 + 12*i));
_info.setWellFormed(false);
}
}
}
Expand Down