|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59861 segmentfault call the fetch method
Submitted: 2011-07-20 05:31 UTC Modified: 2011-07-21 16:30 UTC
From: iammutex at gmail dot com Assigned:
Status: Closed Package: oauth (PECL)
PHP Version: 5.3.4 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: iammutex at gmail dot com
New email:
PHP Version: OS:


 [2011-07-20 05:31 UTC] iammutex at gmail dot com
While the method 'fetch' was called without the '$http_method' 
parameter.there while be an segmentfault.


The *OAUTH_OVERRIDE_HTTP_METHOD* was added to the 
*oauth_fetch* function's parameter, so the pointer 
*final_http_method* was given the value of *method*(It is NULL 
while you dont pass the $http_method parameter)(l.1573).

Then the "strcmp"(l.1699) while trigger a segmentfault error.

Reproduce code:
2598     retcode = oauth_fetch(soo, fetchurl, http_method, request_args, request_headers, NULL, OAUTH_FETCH_USETOKEN | OAUTH_OVERRIDE_HTTP_METHOD TSRM     LS_CC);

1572     if(fetch_flags & OAUTH_OVERRIDE_HTTP_METHOD) {
1573         final_http_method = method;

1699         if (!strcmp(final_http_method, OAUTH_HTTP_METHOD_GET)) {

Expected result:
I think there maybe some way to gave the final_http_method a 
default value.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-20 14:16 UTC]
Is this still happening for you on trunk? I believe it is fixed.

- JJ
 [2011-07-20 22:04 UTC] iammutex at gmail dot com
I think the v1.2 package on the below page is still have this 
 [2011-07-20 22:16 UTC]
Can you check out svn trunk?

$ svn checkout

- JJ
 [2011-07-20 22:29 UTC] iammutex at gmail dot com
I've seen that
 [2011-07-21 16:30 UTC]
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 10:01:24 2023 UTC