cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c

From: Date: Thu, 11 Dec 2008 15:32:24 +0000
Subject: cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-54876@lists.php.net to get a copy of this message
iliaa Thu Dec 11 15:32:24 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdo pdo_stmt.c Log: Fixed a possible corruption inside PDOStatement::debugDumpParams() http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.24.2.39&r2=1.118.2.38.2.24.2.40&diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.39 php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.40 --- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.39 Wed Dec 3 10:18:42 2008 +++ php-src/ext/pdo/pdo_stmt.c Thu Dec 11 15:32:24 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.39 2008/12/03 10:18:42 tony2001 Exp $ */ +/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.40 2008/12/11 15:32:24 iliaa Exp $ */ /* The PDO Statement Handle Class */ @@ -2209,7 +2209,9 @@ if (res == HASH_KEY_IS_LONG) { php_stream_printf(out TSRMLS_CC, "Key: Position #%ld:\n", num); } else if (res == HASH_KEY_IS_STRING) { - php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", len, len, str); + 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, "paramno=%d\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n",

« previous php.cvs (#54876) next »