Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
On Wed, 2017-12-06 at 11:40 -0500, Dawid Zamirski wrote: > On Wed, 2017-12-06 at 16:21 +0100, Michal Privoznik wrote: > > On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > > > > > > &_info.length, &_info.index, 0, &_pos); \ > > > > but not here. Does that work for you? > > > > It does but with a

Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
On Wed, 2017-12-06 at 16:21 +0100, Michal Privoznik wrote: > On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > > > > &_info.length, &_info.index, 0, &_pos); \ > > but not here. Does that work for you? > It does but with a compiler warning :-) I did not realize PHP5 had zend_ulong and I thought

Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Michal Privoznik
On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > The PHP7 variant of the macro wasn't safe if the hash key was not a > string type. This was found when running php script with just > libvirt_connect call under xdebug session which segfaulted. This patch > makes the following changes: > > * make

[libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-05 Thread Dawid Zamirski
The PHP7 variant of the macro wasn't safe if the hash key was not a string type. This was found when running php script with just libvirt_connect call under xdebug session which segfaulted. This patch makes the following changes: * make sure that tmp_name is initialized to NULL * set the key name