summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/pdo/php_pdo_int.h2
-rw-r--r--ext/standard/php_crypt_r.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h
index 62b3bb9188..774cd76f14 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 { \
- strncpy(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
+ strlcpy(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); \
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c
index e0d72448c2..ef711b81e4 100644
--- a/ext/standard/php_crypt_r.c
+++ b/ext/standard/php_crypt_r.c
@@ -382,7 +382,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
/* Now make the output string */
memcpy(passwd, MD5_MAGIC, MD5_MAGIC_LEN);
strlcpy(passwd + MD5_MAGIC_LEN, sp, sl + 1);
- strncat(passwd, "$", 1);
+ strlcat(passwd, "$", 1);
PHP_MD5Final(final, &ctx);