rwcarlsen / goexif

Decode embedded EXIF meta data from image files.
BSD 2-Clause "Simplified" License
627 stars 134 forks source link

Err if rational has a 0-valued denominator #42

Closed rodaine closed 7 years ago

rodaine commented 9 years ago

Encountering panics when ExposureTime values have a denominator of 0 in the RatVal. This change adds a sanity check to ensure that we error appropriately.

op commented 8 years ago

I've encountered this too. The function is even documented to panic. I agree with this change but you should also change the documentation. :)

rodaine commented 8 years ago

Ah good eye. Will add that to the patch in the morning!

xor-gate commented 7 years ago

Hi guys it seems the author is not very active in this project anymore, many forks have been created. I would like to make this stable and I created goexif2 which integrates your patch: https://github.com/xor-gate/goexif2/commit/0c31501343a226b5aef83a013d6e86126ceca28e