Commits

Anonymous committed 711c838

parser/image/png: up the maximum chunk size (I've found PNG files in the wild with big IDAT chunks)

Comments (0)

Files changed (1)

hachoir-parser/hachoir_parser/image/png.py

 from hachoir_core.tools import humanFilesize
 from datetime import datetime
 
-MAX_FILESIZE = 500 * 1024 * 1024
+MAX_FILESIZE = 500 * 1024 * 1024 # 500 MB
 
 try:
     from zlib import decompressobj
 COMPRESSION_NAME = {
     0: u"deflate" # with 32K sliding window
 }
-MAX_CHUNK_SIZE = 500 * 1024 # Maximum chunk size (500 KB)
+MAX_CHUNK_SIZE = 5 * 1024 * 1024 # Maximum chunk size (5 MB)
 
 def headerParse(parent):
     yield UInt32(parent, "width", "Width (pixels)")