Re: [PHP-DEV] refcount problems created by openssl_public_encrypt(symbol table corruption and double free)

2005-05-25 Thread Wez Furlong
The patch doesn't look quite right. - convert_to_string_ex(val); + zval tmpz; + zval *tmpzp; + tmpz = *(*val); + zval_copy_ctor(&tmpz); + tmpz.refcount=1; + tmpzp = &tmpz; I think that this is a place where convert_to_string(val) should be used instead.

[PHP-DEV] refcount problems created by openssl_public_encrypt(symbol table corruption and double free)

2005-05-25 Thread Kamesh Jayachandran
Hi Wez & Jani, Following snippet causes double free of memory, corrupts the symbol table. The culprit is php_openssl_evp_from_zval which is called by openssl_public_encrypt. openssl_public_encrypt reduces the refcount of $pk from 2 to 1. zend_ptr_stack_clear_multiple reduces it again to 0 as a n

[PHP-DEV] PTS support patch

2005-05-25 Thread Michael Spector
Here's a patch for PTS support in proc_open, instead of having PHP_CAN_DO_PTS always disabled this patch introduces --enable-pty option. Added support for BSD4 PTS types. Please review it. -- Best regards, Michael Index: ext/standard/config.m4 ===