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

Does not raise error when it has invalid thumbails data (#65) #66

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/exifr/tiff.rb
Expand Up @@ -384,7 +384,12 @@ def initialize(file)
@jpeg_thumbnails = @ifds.map do |v|
if v.jpeg_interchange_format && v.jpeg_interchange_format_length
start, length = v.jpeg_interchange_format, v.jpeg_interchange_format_length
data[start..(start + length)]
if Integer === start && Integer === length
data[start..(start + length)]
else
EXIFR.logger.warn("Non numeric JpegInterchangeFormat data")
nil
end
end
end.compact
end
Expand Down