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

Unexpected/unhandled segment type or file content: possibly incomplete read of data #140

Open
kaos-ocs opened this issue Jan 29, 2021 · 0 comments

Comments

@kaos-ocs
Copy link

exifread on a file created by Photsoshop. It reads outside the data - data appears to be incomplete. exiftool has noproblems with the file.

(Pdb) s
--Call--
> /usr/lib/python3/dist-packages/exifread/__init__.py(21)process_file()
-> def process_file(f, stop_tag=DEFAULT_STOP_TAG, details=True, strict=False, debug=False, truncate_tags=True, auto_seek=True):
(Pdb) break 152
Breakpoint 1 at /usr/lib/python3/dist-packages/exifread/__init__.py:152
(Pdb) c
DEBUG  JPEG format recognized data[0:2]=0xFFD8
DEBUG  data[2]=0xFF data[3]=0xE0 data[6:10]=b'JFIF'
DEBUG   Length offset is 16
DEBUG   Added to zero
DEBUG   Set segment base to 0x14
DEBUG   Length offset is 30650
DEBUG   Added to base
DEBUG   Set segment base to 0x77D0
DEBUG   Segment base 0x77D0
DEBUG    APP1 at base 0x77D0
DEBUG    Length: 0x3 0xCC
DEBUG    Code: b'II*\x00'
DEBUG   Increment base by 974
DEBUG   Segment base 0x7B9E
DEBUG    APP2 at base 0x7B9E
DEBUG    Length: 0x2 0x40
DEBUG   Code: b'ICC_'
DEBUG   Increment base by 578
DEBUG   Segment base 0x7DE0
DEBUG    APP1 at base 0x7DE0
DEBUG    Length: 0x54 0x90
DEBUG    Code: b'http'
DEBUG   Increment base by 21650
DEBUG   Segment base 0xD272
> /usr/lib/python3/dist-packages/exifread/__init__.py(152)process_file()
-> increment = increment_base(data, base)
(Pdb) base
53874
(Pdb) len(data)
34672
(Pdb) n
IndexError: index out of range
> /usr/lib/python3/dist-packages/exifread/__init__.py(152)process_file()
-> increment = increment_base(data, base)
(Pdb) c
DEBUG    Unexpected/unhandled segment type or file content.

data_dump.txt
exiftool_dump.txt

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

1 participant