8000 Avoid smallint overflow in PNG crc · python-ugame/circuitpython-stage@d12ac5b · GitHub
[go: up one dir, main page]

Skip to content

Commit d12ac5b

Browse files
committed
Avoid smallint overflow in PNG crc
1 parent 088d68f commit d12ac5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def read_header(self):
346346
(
347347
size, chunk, self.width, self.height, self.depth, self.mode,
348348
self.compression, self.filters, self.interlaced, crc
349-
) = struct.unpack(">I4sIIBBBBBI", f.read(25))
349+
) = struct.unpack(">I4sIIBBBBB4s", f.read(25))
350350
assert size == 13 # header length
351351
assert chunk == b'IHDR'
352352
if self.depth != 4 or self.mode != 3 or self.interlaced != 0:

0 commit comments

Comments
 (0)
0