{"action":"created","issue":{"url":"https://api.github.com/repos/gomfunkel/node-exif/issues/14","labels_url":"https://api.github.com/repos/gomfunkel/node-exif/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/gomfunkel/node-exif/issues/14/comments","events_url":"https://api.github.com/repos/gomfunkel/node-exif/issues/14/events","html_url":"https://github.com/gomfunkel/node-exif/pull/14","id":15434272,"number":14,"title":"Handle invalid IFD","user":{"login":"lhagan","id":193810,"avatar_url":"https://avatars.githubusercontent.com/u/193810?v=3","gravatar_id":"","url":"https://api.github.com/users/lhagan","html_url":"https://github.com/lhagan","followers_url":"https://api.github.com/users/lhagan/followers","following_url":"https://api.github.com/users/lhagan/following{/other_user}","gists_url":"https://api.github.com/users/lhagan/gists{/gist_id}","starred_url":"https://api.github.com/users/lhagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhagan/subscriptions","organizations_url":"https://api.github.com/users/lhagan/orgs","repos_url":"https://api.github.com/users/lhagan/repos","events_url":"https://api.github.com/users/lhagan/events{/privacy}","received_events_url":"https://api.github.com/users/lhagan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gomfunkel/node-exif/labels/waiting%20for%20reply","name":"waiting for reply","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2013-06-12T04:18:03Z","updated_at":"2015-02-23T20:09:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gomfunkel/node-exif/pulls/14","html_url":"https://github.com/gomfunkel/node-exif/pull/14","diff_url":"https://github.com/gomfunkel/node-exif/pull/14.diff","patch_url":"https://github.com/gomfunkel/node-exif/pull/14.patch"},"body":"I ran `node-exif` over about 6000 photos, and it got hung up on just one. In this case, it looks like the IFD was invalid, so whereas there would normally be a few IFD entires to loop over, `node-exif` detected over 10000. Not exactly an infinite loop, but it effectively approximates one. This is definitely a problem with the image; `exiftool` fails gracefully and reports: \"Bad ExifIFD directory\" when reading the same file.\r\n\r\nI was able to quickly fix this by adding a sanity check: if the number of entries exceeds 1000, something's got to be wrong so I had it bail out. There's probably a better way to solve this problem, but I figured submitting a pull request would at least be a good way to bring attention to this edge case."},"comment":{"url":"https://api.github.com/repos/gomfunkel/node-exif/issues/comments/75621474","html_url":"https://github.com/gomfunkel/node-exif/pull/14#issuecomment-75621474","issue_url":"https://api.github.com/repos/gomfunkel/node-exif/issues/14","id":75621474,"user":{"login":"lacombar","id":34272,"avatar_url":"https://avatars.githubusercontent.com/u/34272?v=3","gravatar_id":"","url":"https://api.github.com/users/lacombar","html_url":"https://github.com/lacombar","followers_url":"https://api.github.com/users/lacombar/followers","following_url":"https://api.github.com/users/lacombar/following{/other_user}","gists_url":"https://api.github.com/users/lacombar/gists{/gist_id}","starred_url":"https://api.github.com/users/lacombar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacombar/subscriptions","organizations_url":"https://api.github.com/users/lacombar/orgs","repos_url":"https://api.github.com/users/lacombar/repos","events_url":"https://api.github.com/users/lacombar/events{/privacy}","received_events_url":"https://api.github.com/users/lacombar/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T20:09:58Z","updated_at":"2015-02-23T20:09:58Z","body":"The patch is incorrect, AFAIK, there is nothing wrong with a >1000 entry IFD..."}}