php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58606 Crash when addServers is called with an associative array
Submitted: 2009-03-30 17:38 UTC Modified: 2009-03-31 15:46 UTC
From: mkoppanen@php.net Assigned:
Status: Closed Package: memcached (PECL)
PHP Version: 5.2.9 OS: Any
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:
Package:
Bug Type:
Summary:
From: mkoppanen@php.net
New email:
PHP Version: OS:

 

 [2009-03-30 17:38 UTC] mkoppanen@php.net
Description:
------------
The addServers() call causes a crash if the server elements in the array have any other keys than 0, 1 or 2. 



Reproduce code:
---------------
<?php

$servers = array ( 0 => array ( 'KEYHERE' => 'localhost', 11211, 3 ), );

$m = new memcached();

$m->addServers($servers);

Expected result:
----------------
Servers are added succesfully.

Actual result:
--------------
Segmentation fault. Probably happens in php_memcached.c:1400

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-31 07:58 UTC] mkoppanen@php.net
Here is a patch against CVS:

http://valokuva.org/patches/php/memcached/php_memcached_addservers_crash.patch.txt

Seems to be fixing the issue.
 [2009-03-31 15:46 UTC] andrei@php.net
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/memcached


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC