diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2018-10-27 17:30:13 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2018-10-27 17:30:13 +0200 |
commit | 829b0df77b20392115d75fb82c56ad94edc1e423 (patch) | |
tree | 2fc5e0de728e33f8cc4bc84effcada045689ca54 /ext/pgsql/php_pgsql.h | |
parent | bca0a7e2850e50c965ac2e6cb9065e978ac5a9e2 (diff) | |
download | php-git-829b0df77b20392115d75fb82c56ad94edc1e423.tar.gz |
Fix #71592: External entity processing never fails
If the callback set via `xml_set_external_entity_ref_handler()` returns
a falsy value, parsing is supposed to stop and the error number set to
`XML_ERROR_EXTERNAL_ENTITY_HANDLING`. This is already correctly done
by the libexpat binding, but the libxml2 binding ignores the return
value. We fix this by calling `xmlStopParser()` which is available as
of libxml 2.1.0[1] (PHP-7.1 requires at least libxml 2.6.11 anyway),
and setting the desired `errNo` ourselves.
[1] <http://xmlsoft.org/news.html>
Diffstat (limited to 'ext/pgsql/php_pgsql.h')
0 files changed, 0 insertions, 0 deletions