nlopess         Fri Dec 12 23:46:05 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/pdo    pdo_stmt.c 
  Log:
  we do not need the strndup() now that php_stream_printf() handles non-null 
terminated strings correctly
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.24.2.40&r2=1.118.2.38.2.24.2.41&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.40 
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.41
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.40     Thu Dec 11 15:32:24 2008
+++ php-src/ext/pdo/pdo_stmt.c  Fri Dec 12 23:46:05 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.40 2008/12/11 15:32:24 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.41 2008/12/12 23:46:05 nlopess Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -2209,9 +2209,7 @@
                        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",



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to