Summary | Divide by zero error in /ansel/lib/Exif.php |
Queue | Ansel |
Queue Version | 1.1 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | jon (at) spriggs (dot) org (dot) uk |
Created | 12/08/2009 (5701 days ago) |
Due | |
Updated | 01/13/2010 (5665 days ago) |
Assigned | 12/09/2009 (5700 days ago) |
Resolved | 12/13/2009 (5696 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
Protect against division by zero from faulty exif data.
Bug: 8761http://git.horde.org/diff.php/framework/Image/lib/Horde/Image/Exif.php?rt=horde-git&r1=6b4e0ea33bc6cfa1269e6dca4f56f89f421921c0&r2=e2c90271b152af30c18674bef5e93e742b90097e
State ⇒ Resolved
fields when the value is not defined in the image source. Fixed,
though instead of returning zero like your patch did, we simply return
from the function, since the value of x/0 is not 0, but undefined.
Thanks for the catch!
Protect against division by zero from faulty exif data.
Bug: 8761http://git.horde.org/diff.php/framework/Image/lib/Horde/Image/Exif.php?rt=horde-hatchery&r1=6b4e0ea33bc6cfa1269e6dca4f56f89f421921c0&r2=e2c90271b152af30c18674bef5e93e742b90097e
Protect from divide-by-zero errors due to faulty exif data.
Bug: 8761Submitted by: jon (at) spriggs (dot) org (dot) uk
http://cvs.horde.org/diff.php/ansel/lib/Exif.php?rt=horde&r1=1.41.2.11&r2=1.41.2.12&ty=u
this should be checked...OTOH, the exif standard says that values
for those fields shouldn't contain a zero denominator and are
rational numbers. What is the source of the exif information that is
broken? Can you upload a sample image file?
http://jon.spriggs.org.uk/exif_error.jpg
patches, and thanks!
Jon
State ⇒ Feedback
this should be checked...OTOH, the exif standard says that values for
those fields shouldn't contain a zero denominator and are rational
numbers. What is the source of the exif information that is broken?
Can you upload a sample image file?
Also, please read docs/CODING_STANDARDS when submitting future
patches, and thanks!
Assigned to Michael Rubinsky
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Divide by zero error in /ansel/lib/Exif.php
Queue ⇒ Ansel
Milestone ⇒
Patch ⇒ Yes
New Attachment: diff.txt
State ⇒ Unconfirmed
whether it's about to divide by zero when calculating the shutter
speed. This patch fixes the issue in /ansel/lib/Exif.php.