diff --git a/CHANGELOG.md b/CHANGELOG.md index 04f30ad9083b180c88c3e7c60ccbb0a8ae3a806e..c547c8f31066bf7cdd3c38c5c71e3e97ca5df5c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,13 @@ # Changelog - All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.1.8] - 2023-11-29 +### Fixed +- libxml internal buffer leak [#5] + ## [0.1.7] - 2022-12-17 ### Added - Support for PHP 8.2 [#4]. @@ -26,7 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [0.1.3] - 2019-07-20 ### Fixed -- UTF-8 econding issues +- UTF-8 enconding issues ## [0.1.2] - 2019-05-25 ### Fixed @@ -43,7 +46,9 @@ First version [#2]: https://github.com/oscarotero/html-parser/issues/2 [#3]: https://github.com/oscarotero/html-parser/issues/3 [#4]: https://github.com/oscarotero/html-parser/issues/4 +[#5]: https://github.com/oscarotero/html-parser/issues/5 +[0.1.8]: https://github.com/oscarotero/html-parser/compare/v0.1.7...v0.1.8 [0.1.7]: https://github.com/oscarotero/html-parser/compare/v0.1.6...v0.1.7 [0.1.6]: https://github.com/oscarotero/html-parser/compare/v0.1.5...v0.1.6 [0.1.5]: https://github.com/oscarotero/html-parser/compare/v0.1.4...v0.1.5 diff --git a/src/Parser.php b/src/Parser.php index e92b3294cd79973301e4d354a78a27aee080e821..3c58301245b1d58c62c20c7da7a7f4b8ceeacb1f 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -90,6 +90,10 @@ class Parser libxml_disable_entity_loader($entities); } + if (libxml_get_last_error() !== false) { + libxml_clear_errors(); + } + return $document; } }