summaryrefslogtreecommitdiff
path: root/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2021-01-05 15:52:38 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2021-01-05 23:40:24 +0100
commitd1b1c043988277b7c0d46ec7c953418cbfbb2608 (patch)
tree5992e04701eb45397c12bf6568f9825457166b7d /ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
parent5c963731e2eeed47815c6f23ec917988c3fe4121 (diff)
downloadphp-git-d1b1c043988277b7c0d46ec7c953418cbfbb2608.tar.gz
Fix #77565: Incorrect locator detection in ZIP-based phars
We must not assume that the first end of central dir signature in a ZIP archive actually designates the end of central directory record, since the data in the archive may contain arbitrary byte patterns. Thus, we better search from the end of the data, what is also slightly more efficient. There is, however, no way to detect the end of central directory signature by searching from the end of the ZIP archive with absolute certainty, since the signature could be part of the trailing comment. To mitigate, we check that the comment length fits to the found position, but that might still not be the correct position in rare cases. Closes GH-6507.
Diffstat (limited to 'ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp')
0 files changed, 0 insertions, 0 deletions