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

Reading EXIF information throws exception #29

Open
cajus opened this issue Aug 24, 2018 · 1 comment
Open

Reading EXIF information throws exception #29

cajus opened this issue Aug 24, 2018 · 1 comment

Comments

@cajus
Copy link

cajus commented Aug 24, 2018

Trying to examine this image (yes, it is just white) runs into

RangeError [ERR_INDEX_OUT_OF_RANGE]: Index out of range
    at checkOffset (buffer.js:1024:11)
    at Buffer.readUInt16LE (buffer.js:1072:5)
    at BufferStream.nextUInt16 (node_modules/exif-parser/lib/bufferstream.js:24:84)
    at readIFDSection (node_modules/exif-parser/lib/exif.js:86:31)
    at Object.parseTags (node_modules/exif-parser/lib/exif.js:140:4)
    at node_modules/exif-parser/lib/parser.js:143:29
    at Object.parseSections (node_modules/exif-parser/lib/jpeg.js:21:4)
    at Parser.parse (node_modules/exif-parser/lib/parser.js:140:8)

, while the ordinary exif tool on the command line succeeds without any problems.

The latest PR added some robustness code at exactly the same position, but it doesn't seem to help here. Looks like it reads from an out of range offset instead. I'm not deep enough in this stuff to decide if the EXIF information is broken or if there's a LE/BE problem in the offset decoding.

Any idea?

@mabrahao
Copy link

I'm having the same issue here. Could you let me know if you figured out a solution for this? I'm running my code on a lambda function, and I don't want to rely on ExifTool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants