Patch patch for PDO related Bug #71569
Patch version 2016-02-13 12:20 UTC
Return to Bug #71569 |
Download this patch
Patch Revisions:
Developer: pavel2000@ngs.ru
--- php_pdo_driver.h.orig 2016-01-06 15:14:47.000000000 +0000
+++ php_pdo_driver.h 2016-02-13 12:12:10.000000000 +0000
@@ -213,10 +213,13 @@ static inline char *pdo_attr_strval(zval
if (options && SUCCESS == zend_hash_index_find(Z_ARRVAL_P(options), option_name, (void**)&v)) {
if (Z_TYPE_PP(v) != IS_STRING) {
+ char *ret;
zval tmp = **v;
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
- return Z_STRVAL(tmp);
+ ret = estrndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
+ zval_dtor(&tmp);
+ return ret;
}
return estrndup(Z_STRVAL_PP(v), Z_STRLEN_PP(v));
}
|