diff --git a/crtools.c b/crtools.c index 3a9582e79..9ea5269b5 100644 --- a/crtools.c +++ b/crtools.c @@ -237,7 +237,7 @@ int get_image_path(char *path, int size, const char *fmt, int pid) int image_dir_size = strlen(image_dir); int ret; - strcpy(path, image_dir); + strncpy(path, image_dir, size); path[image_dir_size] = '/'; size -= image_dir_size + 1;