summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqlnd/mysqlnd_priv.h')
-rw-r--r--ext/mysqlnd/mysqlnd_priv.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h
index cf6424e49f..9762a60542 100644
--- a/ext/mysqlnd/mysqlnd_priv.h
+++ b/ext/mysqlnd/mysqlnd_priv.h
@@ -149,8 +149,8 @@
#define SET_CLIENT_ERROR(error_info, a, b, c) \
{ \
error_info.error_no = a; \
- strncpy(error_info.sqlstate, b, sizeof(error_info.sqlstate)); \
- strncpy(error_info.error, c, sizeof(error_info.error)); \
+ strlcpy(error_info.sqlstate, b, sizeof(error_info.sqlstate)); \
+ strlcpy(error_info.error, c, sizeof(error_info.error)); \
}
#define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR(stmt->error_info, a, b, c)