php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33502 Some nullary functions don't check the number of arguments
Submitted: 2005-06-28 21:44 UTC Modified: 2018-07-12 13:01 UTC
From: bah at xpto dot org Assigned: cmb (profile)
Status: Closed Package: *General Issues
PHP Version: 7.3Git-2018-07-12 (Git) OS: *
Private report: No CVE-ID: None
 [2005-06-28 21:44 UTC] bah at xpto dot org
Description:
------------
Index: output.c
===================================================================
RCS file: /repository/php-src/main/output.c,v
retrieving revision 1.166
diff -u -r1.166 output.c
--- output.c    28 Apr 2005 14:20:28 -0000      1.166
+++ output.c    28 Jun 2005 19:41:33 -0000
@@ -1042,6 +1042,10 @@
    Reset(clear) URL rewriter values */
 PHP_FUNCTION(output_reset_rewrite_vars)
 {
+       if (ZEND_NUM_ARGS() != 0) {
+               ZEND_WRONG_PARAM_COUNT();
+       }
+
        if (php_url_scanner_reset_vars(TSRMLS_C) == SUCCESS) {
                RETURN_TRUE;
        } else {


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 22:57 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Output Control
 [2018-07-12 13:01 UTC] cmb@php.net
-Summary: output_reset_rewrite_vars doesnt check the number of parameters +Summary: Some nullary functions don't check the number of arguments -Status: Open +Status: Verified -Type: Feature/Change Request +Type: Bug -Package: Output Control +Package: *General Issues -Operating System: n/a +Operating System: * -PHP Version: 5CVS-2005-06-28 (dev) +PHP Version: 7.3Git-2018-07-12 (Git) -Assigned To: +Assigned To: cmb
 [2018-07-12 13:01 UTC] cmb@php.net
We had some discussion about this issue on the internals mailing
list[1], and have decided to treat this as bug, but for BC reasons
to apply the fix the master only.

Besides output_reset_rewrite_vars(), the following functions are
also affected:

* func_num_args()
* gc_status()
* gc_disable()
* gc_enable()
* gc_enabled()
* gc_collect_cycles()
* gc_mem_caches()
* zend_version()

[1] <https://externals.io/message/102553>
 [2018-07-12 13:07 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6c630eefcb4936dab30d315b672f9eee0e485369
Log: Fix #33502: Some nullary functions don't check the number of arguments
 [2018-07-12 13:07 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC