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
 [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

Pull Requests

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: Mon Dec 30 14:01:28 2024 UTC