From: Stanislav Malyshev Date: Fri, 16 Feb 2007 18:48:53 +0000 (+0000) Subject: use error message size X-Git-Tag: php-5.2.2RC1~376 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8edc9018db66adfe703dd0b8b2ee71dfb5b6c082;p=php use error message size --- 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; } /* }}} */