From: Nuno Lopes Date: Fri, 12 Dec 2008 23:46:05 +0000 (+0000) Subject: we do not need the strndup() now that php_stream_printf() handles non-null terminated... X-Git-Tag: php-5.3.0beta1~439 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2f7ed49871275f89a049d5628e7f95a1b6bb4c1;p=php we do not need the strndup() now that php_stream_printf() handles non-null terminated strings correctly --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 4566312d14..f82261f6a8 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2209,9 +2209,7 @@ static PHP_METHOD(PDOStatement, debugDumpParams) if (res == HASH_KEY_IS_LONG) { php_stream_printf(out TSRMLS_CC, "Key: Position #%ld:\n", num); } else if (res == HASH_KEY_IS_STRING) { - char *s = estrndup(str, len); - php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", len, len, s); - efree(s); + php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", len, len, str); } php_stream_printf(out TSRMLS_CC, "paramno=%d\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n",