]> granicus.if.org Git - php/commitdiff
use error message size
authorStanislav Malyshev <stas@php.net>
Fri, 16 Feb 2007 18:48:53 +0000 (18:48 +0000)
committerStanislav Malyshev <stas@php.net>
Fri, 16 Feb 2007 18:48:53 +0000 (18:48 +0000)
ext/mysqli/mysqli.c

index 92106125cf8bd41f4fe5d60949e2ab58f9992981..e31d09a2c7078cc14b657b1ef1e72999702c56e6 100644 (file)
@@ -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;
 }
 /* }}} */