fix open JPEG file if wrong or unknow 8BIM tag

This commit is contained in:
stalkerg 2020-12-11 18:26:20 +09:00
parent 1580f2f888
commit b74b101a45

View File

@ -133,7 +133,7 @@ def APP(self, marker):
photoshop[code] = data
offset += size
offset += offset & 1 # align
except struct.error:
except (struct.error, IndexError):
break # insufficient data
elif marker == 0xFFEE and s[:5] == b"Adobe":