nicolasff/phpredis — Issue #102: SEGV occurred Redis::zDelete with wrong parameter.
Author: chobie
Created: 2011-12-11 15:08:15+00:00
State: open

Hi Nicolas,
Thank you for improving phpredis.

well, i've found minor issue regarding zDelete parameters.
i tried to fix this issue but some methods does not use `zend_parse_method_parameters`.
i realized i need some time to fix this. for now, i report this issue at this time.

````
connect('localhost');
$redis->zDelete("key"); // missing second parameter.
````

````
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000e0013c
0x000000010182f33e in zim_Redis_zDelete (ht=1, return_value=0x100d5c470, return_value_ptr=0x0, this_ptr=0x100d59910, return_value_used=0, tsrm_ls=0x100e000f0) at redis.c:3401
3401 IF_ATOMIC() {
(gdb) p (RedisSock)redis_sock
$4 = {
stream = 0xe000f0,
host = 0x100e000f0 "੘\001\001",
port = 13312,
timeout = 2.1289118957868654e-314,
failed = 0,
status = 0,
persistent = 14009456,
persistent_id = 0x100418823 "H�E�H�}�",
serializer = 4,
prefix = 0x1004961eb "��UH��H��\020H�}�H�u�H�E�H�0H�}��\017O\024",
prefix_len = 6538200,
mode = MULTI,
head = 0x100e000f0,
current = 0x0,
pipeline_head = 0x80,
pipeline_current = 0x100d5c418
}
````

Thanks,
Shuhei