php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74163 Segfault in sort compare func
Submitted: 2017-02-24 22:10 UTC Modified: 2017-02-27 15:18 UTC
From: as@php.net Assigned:
Status: Closed Package: oauth (PECL)
PHP Version: 7.1Git-2017-02-24 (Git) OS:
Private report: No CVE-ID: None
 [2017-02-24 22:10 UTC] as@php.net
Description:
------------
Internal function `oauth_http_build_query` segfaults when encoding an array value. The underlying issue is in the sort comparator `oauth_compare_value` which is doing a PHP 5-style cast. Bugfix attached.

Test script:
---------------
<?php

oauth_get_sbs('GET', 'http://127.0.0.1:12342/script',array('arg2' => [1, 2, 3]));

Expected result:
----------------
no segfault

Actual result:
--------------
segfault

Patches

patch-fix-sort (last revision 2017-02-24 22:11 UTC by as@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-24 22:11 UTC] as@php.net
The following patch has been added/updated:

Patch Name: patch-fix-sort
Revision:   1487974311
URL:        https://bugs.php.net/patch-display.php?bug=74163&patch=patch-fix-sort&revision=1487974311
 [2017-02-24 22:13 UTC] as@php.net
Credit to github.com/russpos for discovering this :)
 [2017-02-27 15:16 UTC] as@php.net
Automatic comment on behalf of as
Revision: http://git.php.net/?p=pecl/web_services/oauth.git;a=commit;h=f1a5b6dea1982dab03c810edd321ca57907d41fe
Log: Fix bug #74163: Segfault in oauth_compare_value
 [2017-02-27 15:16 UTC] as@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 03:01:32 2024 UTC