summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 71f4277ef5..883b4ae0cf 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -252,12 +252,12 @@ static int _restore_connection_defaults(zend_rsrc_list_entry *rsrc TSRMLS_DC)
}
/* rollback possible transactions */
- strcpy (query, "ROLLBACK");
+ memcpy(query, "ROLLBACK", sizeof("ROLLBACK"));
/* Binary safe query not required here */
mysql_query(&link->conn, query);
/* restore session variable "autocommit" to default (=1) */
- strcpy (query, "SET AUTOCOMMIT=1");
+ memcpy(query, "SET AUTOCOMMIT=1", sizeof("SET AUTOCOMMIT=1"));
/* Binary safe query not required here */
mysql_query(&link->conn, query);
@@ -2198,7 +2198,7 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
Z_TYPE_P(return_value) = IS_STRING;
break;
case PHP_MYSQL_FIELD_FLAGS:
- strcpy(buf, "");
+ memcpy(buf, "", sizeof(""));
#ifdef IS_NOT_NULL
if (IS_NOT_NULL(mysql_field->flags)) {
strcat(buf, "not_null ");