lib/tiff.rb in exifr-0.10.1 vs lib/tiff.rb in exifr-0.10.2
- old
+ new
@@ -379,10 +379,10 @@
def inspect
to_hash.inspect
end
def next
- IFD.new(@data, @offset_next) unless @offset_next == 0
+ IFD.new(@data, @offset_next) unless @offset_next == 0 || @offset_next >= @data.size
end
private
def add_field(field)
return unless tag = TAG_MAPPING[@type][field.tag]
\ No newline at end of file