Commit 08faefd6 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

crtools: Use safe strncpy in get_image_path

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarPavel Emelianov <xemul@parallels.com>
parent 6485fbd2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment