mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-22 21:24:46 +03:00
fix open JPEG file if wrong or unknow 8BIM tag
This commit is contained in:
parent
1580f2f888
commit
b74b101a45
|
@ -133,7 +133,7 @@ def APP(self, marker):
|
||||||
photoshop[code] = data
|
photoshop[code] = data
|
||||||
offset += size
|
offset += size
|
||||||
offset += offset & 1 # align
|
offset += offset & 1 # align
|
||||||
except struct.error:
|
except (struct.error, IndexError):
|
||||||
break # insufficient data
|
break # insufficient data
|
||||||
|
|
||||||
elif marker == 0xFFEE and s[:5] == b"Adobe":
|
elif marker == 0xFFEE and s[:5] == b"Adobe":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user