You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zlib/bz2/phar: cap decompression output at filter level
Adds an optional max_output parameter to zlib.inflate and
bzip2.decompress filters. When set, the filter tracks bytes emitted
and aborts with PSFS_ERR_FATAL once the cap is exceeded, stopping
decompression amplification mid-stream instead of after the full
payload has landed on disk.
phar_open_entry_fp() passes entry->uncompressed_filesize as the cap
so a lying phar (small declared size, payload that decompresses
beyond it) fails during streaming. The previous post-copy filesize
mismatch check is retained to catch under-decompression.
The parameter is opt-in: omitting the key keeps existing behavior for
all current callers.
Notice: file_get_contents(): zlib.inflate: decompressed output exceeded max_output in %s on line %d
32
+
31
33
Warning: file_get_contents(phar://%s/a): Failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line %d
32
34
bool(false)
33
35
36
+
Notice: file_get_contents(): zlib.inflate: decompressed output exceeded max_output in %s on line %d
37
+
34
38
Warning: file_get_contents(phar://%s/b): Failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "b") in %s on line %d
35
39
bool(false)
36
40
string(1) "*"
37
41
42
+
Notice: file_get_contents(): zlib.inflate: decompressed output exceeded max_output in %s on line %d
43
+
38
44
Warning: file_get_contents(phar://%s/d): Failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "d") in %s on line %d
0 commit comments