From d229a480ad5a63b029cc0d74ba251c5ddb8738e4 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 8 Aug 2023 10:44:04 +0100 Subject: [PATCH] Fix GH-11876: ini_parse_quantity() accepts invalid quantities Closes GH-11910 --- NEWS | 2 ++ Zend/tests/zend_ini/gh11876.phpt | 51 ++++++++++++++++++++++++++++++++ Zend/zend_ini.c | 40 +++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 Zend/tests/zend_ini/gh11876.phpt diff --git a/NEWS b/NEWS index dc48ab51822..8e9c36ecdd9 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . Fixed bug GH-11937 (Constant ASTs containing objects). (ilutov) . Fixed bug GH-11790 (On riscv64 require libatomic if actually needed). (Jeremie Courreges-Anglas) + . Fixed bug GH-11876: ini_parse_quantity() accepts invalid quantities. + (Girgias) - DOM: . Fix memory leak when setting an invalid DOMDocument encoding. (nielsdos) diff --git a/Zend/tests/zend_ini/gh11876.phpt b/Zend/tests/zend_ini/gh11876.phpt new file mode 100644 index 00000000000..b83061bf161 --- /dev/null +++ b/Zend/tests/zend_ini/gh11876.phpt @@ -0,0 +1,51 @@ +--TEST-- +Invalid INI quantities, base prefix followed by stuff eaten by strtoull() +--EXTENSIONS-- +zend_test +--FILE-- +