From: Felipe Pena Date: Mon, 12 Oct 2009 17:20:30 +0000 (+0000) Subject: - Fixed class name in row_get_classname (PDORow) X-Git-Tag: php-5.4.0alpha1~191^2~2516 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d41c132f0a4f272f86e6426c9195831040dcc579;p=php - Fixed class name in row_get_classname (PDORow) --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 07826fb3eb..1e443c2246 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2796,7 +2796,7 @@ static union _zend_function *row_get_ctor(zval *object TSRMLS_DC) int namelen = sizeof("__construct"); ctor.type = ZEND_INTERNAL_FUNCTION; - ctor.function_name.u = malloc(UBYTES(namelen)); + ctor.function_name.u = emalloc(UBYTES(namelen)); u_charsToUChars("__construct", ctor.function_name.u, namelen); ctor.scope = pdo_row_ce; @@ -2815,8 +2815,10 @@ static int row_get_classname(const zval *object, zstr *class_name, zend_uint *c if (parent) { return FAILURE; } else { - *class_name = ezstrndup(IS_UNICODE, ZSTR("PDORow"), sizeof("PDORow") - 1); - *class_name_len = sizeof("PDORow")-1; + int namelen = sizeof("PDORow"); + + (*class_name).u = emalloc(UBYTES(namelen)); + u_charsToUChars("PDORow", (*class_name).u, namelen); return SUCCESS; } }