svn: /php/php-src/ branches/PHP_5_3/ext/pdo/php_pdo_int.h branches/PHP_5_4/ext/pdo/php_pdo_int.h trunk/ext/pdo/php_pdo_int.h
| From: | Rasmus Lerdorf | Date: | Sun, 07 Aug 2011 15:45:18 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/pdo/php_pdo_int.h branches/PHP_5_4/ext/pdo/php_pdo_int.h trunk/ext/pdo/php_pdo_int.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65753@lists.php.net to get a copy of this message | ||
rasmus Sun, 07 Aug 2011 15:45:18 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314435
Log:
Not an issue here, but a good habit to follow consistently. Never use strcpy/strcat.
Changed paths:
U php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h
U php/php-src/branches/PHP_5_4/ext/pdo/php_pdo_int.h
U php/php-src/trunk/ext/pdo/php_pdo_int.h
Modified: php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h 2011-08-07 15:38:36 UTC (rev 314434)
+++ php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h 2011-08-07 15:45:18 UTC (rev 314435)
@@ -58,7 +58,7 @@
extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC);
#define PDO_DBH_CLEAR_ERR() do { \
- strcpy(dbh->error_code, PDO_ERR_NONE); \
+ strncpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
if (dbh->query_stmt) { \
dbh->query_stmt = NULL; \
zend_objects_store_del_ref(&dbh->query_stmt_zval TSRMLS_CC); \
Modified: php/php-src/branches/PHP_5_4/ext/pdo/php_pdo_int.h
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pdo/php_pdo_int.h 2011-08-07 15:38:36 UTC (rev 314434)
+++ php/php-src/branches/PHP_5_4/ext/pdo/php_pdo_int.h 2011-08-07 15:45:18 UTC (rev 314435)
@@ -58,7 +58,7 @@
extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC);
#define PDO_DBH_CLEAR_ERR() do { \
- strcpy(dbh->error_code, PDO_ERR_NONE); \
+ strncpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
if (dbh->query_stmt) { \
dbh->query_stmt = NULL; \
zend_objects_store_del_ref(&dbh->query_stmt_zval TSRMLS_CC); \
Modified: php/php-src/trunk/ext/pdo/php_pdo_int.h
===================================================================
--- php/php-src/trunk/ext/pdo/php_pdo_int.h 2011-08-07 15:38:36 UTC (rev 314434)
+++ php/php-src/trunk/ext/pdo/php_pdo_int.h 2011-08-07 15:45:18 UTC (rev 314435)
@@ -58,7 +58,7 @@
extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC);
#define PDO_DBH_CLEAR_ERR() do { \
- strcpy(dbh->error_code, PDO_ERR_NONE); \
+ strncpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
if (dbh->query_stmt) { \
dbh->query_stmt = NULL; \
zend_objects_store_del_ref(&dbh->query_stmt_zval TSRMLS_CC); \