From f2f7ed49871275f89a049d5628e7f95a1b6bb4c1 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Fri, 12 Dec 2008 23:46:05 +0000 Subject: [PATCH] we do not need the strndup() now that php_stream_printf() handles non-null terminated strings correctly --- ext/pdo/pdo_stmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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", -- 2.50.1