|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58906 Non string params array value crashes PHP
Submitted: 2009-10-19 12:04 UTC Modified: 2009-10-25 00:43 UTC
From: andrew at topdog dot za dot net Assigned:
Status: Closed Package: oauth (PECL)
PHP Version: 5.2.10 OS: Linux
Private report: No CVE-ID: None
 [2009-10-19 12:04 UTC] andrew at topdog dot za dot net
The oauth_http_build_query does not verify the data that the user submits via the extra_parameters array in the fetch method.

param_value = oauth_url_encode(Z_STRVAL_PP((zval**)cur_val)); 

This assumes that the user submits a string value in the extra_parameters array, if however the user submits an integer value as the array value, PHP crashes with out of bounds memory error. 

$arrayResp = $o->fetch("",array("postal" => "95054"));

$arrayResp = $o->fetch("",array("postal" => 95054));

Reproduce code:
This will crash.

$arrayResp = $o->fetch("",array("postal" => 95054));

This does not as it is a string.

$arrayResp = $o->fetch("",array("postal" => "95054"));


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-25 00:43 UTC]
This is fixed in the trunk:

Duplicate of #16853
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 09:03:37 2021 UTC