mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
skip any number extraneous chars at the end of chunks
This commit is contained in:
parent
8c3f66a9ae
commit
0b19a86087
|
@ -288,7 +288,7 @@ class JpegImageFile(ImageFile.ImageFile):
|
|||
|
||||
s = self.fp.read(1)
|
||||
|
||||
if i8(s[0]) != 255:
|
||||
if i8(s) != 255:
|
||||
raise SyntaxError("not a JPEG file")
|
||||
|
||||
# Create attributes
|
||||
|
@ -311,7 +311,7 @@ class JpegImageFile(ImageFile.ImageFile):
|
|||
i = i16(s)
|
||||
else:
|
||||
# Skip non-0xFF junk
|
||||
s = b"\xff"
|
||||
s = self.fp.read(1)
|
||||
continue
|
||||
|
||||
if i in MARKER:
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 105 KiB |
Loading…
Reference in New Issue
Block a user