php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60226 segfault when calling setCAPath
Submitted: 2011-11-05 22:03 UTC Modified: 2011-11-07 10:41 UTC
From: glen at delfi dot ee Assigned: felipe (profile)
Status: Closed Package: oauth (PECL)
PHP Version: 5.3.8 OS: PLD Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: glen at delfi dot ee
New email:
PHP Version: OS:

 

 [2011-11-05 22:03 UTC] glen at delfi dot ee
Description:
------------
$ cat tests/setCAPath.php 
<?php

$oauth = new OAuth('1', '2', OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);
$o = $oauth->setCAPath('/etc/certs/ca-certificates.crt');
error_log("set path: $o");


this program causes segfault:

Program received signal SIGSEGV, Segmentation fault.
0x404d3afa in memcpy () from /lib/tls/libc.so.6
(gdb) bt
#0  0x404d3afa in memcpy () from /lib/tls/libc.so.6
#1  0x4018e635 in _estrndup () from /usr/lib/libphp_common-5.2.17.so
#2  0x41a9be2e in zim_oauth_setCAPath (ht=18, return_value=0x405b9628, 
return_value_ptr=0x0, this_ptr=0x10, return_value_used=1, tsrm_ls=0x405bb0e8)
    at /home/glen/rpm/pld/BUILD/php-pecl-oauth-1.2.2/oauth.c:2125
#3  0x401c80df in execute () from /usr/lib/libphp_common-5.2.17.so
#4  0x401c772c in execute () from /usr/lib/libphp_common-5.2.17.so
#5  0x401a9fe5 in zend_execute_scripts () from /usr/lib/libphp_common-5.2.17.so
#6  0x40162aa9 in php_execute_script () from /usr/lib/libphp_common-5.2.17.so
#7  0x0804b70d in main ()
(gdb) 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-06 13:43 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2011-11-06 13:43 UTC] felipe@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2011-11-07 10:41 UTC] glen at delfi dot ee
svn link (for reference):

http://svn.php.net/viewvc/pecl/oauth/trunk/oauth.c?
r1=318824&r2=318823&pathrev=318824
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 09:01:26 2025 UTC