diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2011-08-07 15:45:18 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2011-08-07 15:45:18 +0000 |
commit | 2449c4169855c39efddd3311eb634da78cf23eba (patch) | |
tree | e571d43f59dd29a3b8503bd95ce4485d1371ef27 /ext/pdo/php_pdo_int.h | |
parent | bcf8485ef5efa882b951d6f5f8ce28edd4399c57 (diff) | |
download | php-git-2449c4169855c39efddd3311eb634da78cf23eba.tar.gz |
Not an issue here, but a good habit to follow consistently. Never use strcpy/strcat.
Diffstat (limited to 'ext/pdo/php_pdo_int.h')
-rwxr-xr-x | ext/pdo/php_pdo_int.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index fa9abca406..62b3bb9188 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); \ |