summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-12 10:09:37 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-31 09:28:59 +0200
commit376bbbdf3b6b0ec08102c3ccb31746c2a7d9bdd6 (patch)
treec45ab4d348831822a3b49fff1cbc1b238bd2c74c /ext/zip/php_zip.c
parente948188832185171182a274567146757c13b9fac (diff)
downloadphp-git-376bbbdf3b6b0ec08102c3ccb31746c2a7d9bdd6.tar.gz
Make MAX_IFD_NESTING_LEVEL an actual nesting level
Currently we only ever increment ifd_nesting_level, so this ends up being a limit on the total number of IFD tags and we regularly get bug reports of it being exceeded. I think the intention behind this limit was to prevent recursion stack overflow, and for that we only need to check actual recursive usage. I've implemented that here, and dropped the nesting limit down to a smaller value (which still passes our tests). However, it seems that we do also need to have a total limit on the number of tags, as we don't catch some instances of infinite looping otherwise. Add this as a separate limit with a higher value, that should hopefully be sufficient. This is expected to fix a number of bugs: https://bugs.php.net/bug.php?id=78083 https://bugs.php.net/bug.php?id=78701 https://bugs.php.net/bug.php?id=79907 https://bugs.php.net/bug.php?id=80016
Diffstat (limited to 'ext/zip/php_zip.c')
0 files changed, 0 insertions, 0 deletions