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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy