laruence / php-lua

This extension embeds the lua interpreter and offers an OO-API to lua variables and functions.
http://pecl.php.net/package/lua
Other
149 stars 50 forks source link

Fix non-string member access in read/write prop. #35

Closed sgolemon closed 6 years ago

sgolemon commented 6 years ago

These both have a null pointer deref waiting to happen and are coincidentally more complex than they need to be.

zval_get_string() will incref any IS_STRING zval, or copy/convert any non-string zval.

zend_string_release() will then decref or free as appropriate.