From ee729585b395b89aeb167a5ea321194157f7d70a Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sun, 7 Aug 2011 15:45:18 +0000 Subject: [PATCH] Not an issue here, but a good habit to follow consistently. Never use strcpy/strcat. --- ext/pdo/php_pdo_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index fa9abca4068..62b3bb91884 100755 --- a/ext/pdo/php_pdo_int.h +++ b/ext/pdo/php_pdo_int.h @@ -58,7 +58,7 @@ extern pdo_driver_t *pdo_find_driver(const char *name, int namelen); 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); \