From 68f328560d4730c73b70776e9574e8ac11e80e39 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 24 Oct 2007 22:50:19 +0000 Subject: [PATCH] MFB: Fixed bug #43099 (XMLWriter::endElement() does not check # of params) --- NEWS | 2 ++ ext/xmlwriter/php_xmlwriter.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index fe2a66dfae..c5fc470a67 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,8 @@ PHP NEWS - Fixed htmlentities/htmlspecialchars not to accept partial multibyte sequences. (Stas) +- Fixed bug #43099 (XMLWriter::endElement() does not check # of params). + (Ilia) - Fixed bug #43020 (Warning message is missing with shuffle() and more than one argument). (Scott) - Fixed bug #4294 (Move *timeout initialization from RINIT to connect time). diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index 45a0d912c1..5fcdc54b0b 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -464,6 +464,9 @@ static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_read_int_t if (this) { XMLWRITER_FROM_OBJECT(intern, this); + if (ZEND_NUM_ARGS()) { + WRONG_PARAM_COUNT; + } } else #endif { -- 2.50.1