From 8edc9018db66adfe703dd0b8b2ee71dfb5b6c082 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Fri, 16 Feb 2007 18:48:53 +0000 Subject: [PATCH] use error message size --- ext/mysqli/mysqli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 92106125cf..e31d09a2c7 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -1130,10 +1130,10 @@ int php_local_infile_error(void *ptr, char *error_msg, uint error_msg_len) mysqli_local_infile *data = (mysqli_local_infile *) ptr; if (data) { - strcpy(error_msg, data->error_msg); + strlcpy(error_msg, data->error_msg, error_msg_len); return 2000; } - strcpy(error_msg, ER(CR_OUT_OF_MEMORY)); + strlcpy(error_msg, ER(CR_OUT_OF_MEMORY), error_msg_len); return CR_OUT_OF_MEMORY; } /* }}} */ -- 2.50.1