mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-24 14:14:47 +03:00
fix unpack to c_ssize_t on 32 bit systems with corrupt EXIF data
This commit is contained in:
parent
f3f45cfec5
commit
9c7d3a0e4a
|
@ -771,7 +771,12 @@ class ImageFileDirectory_v2(MutableMapping):
|
||||||
"Tag Location: %s - Data Location: %s" % (here, offset),
|
"Tag Location: %s - Data Location: %s" % (here, offset),
|
||||||
end=" ",
|
end=" ",
|
||||||
)
|
)
|
||||||
fp.seek(offset)
|
try:
|
||||||
|
fp.seek(offset)
|
||||||
|
except OverflowError as e:
|
||||||
|
if DEBUG:
|
||||||
|
print("- offset value wrong. Possibly corrupt EXIF data. ", e)
|
||||||
|
continue # ignore corrupt EXIF data
|
||||||
data = ImageFile._safe_read(fp, size)
|
data = ImageFile._safe_read(fp, size)
|
||||||
fp.seek(here)
|
fp.seek(here)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user