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 | bfffb28ebf44aa872876937e1607fb7316099940 (patch) | |
tree | b3eb8b08f379665421de8f25d56280f5acea450c /ext/pdo/php_pdo_int.h | |
parent | 97bc4c84032881cd398e46098e8cfbae6f3a9590 (diff) | |
download | php-git-bfffb28ebf44aa872876937e1607fb7316099940.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); \ |