mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 06:21:08 +00:00
coverity: #1425753
Copy into fixed size buffer Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
This commit is contained in:
parent
21e20322cf
commit
98c7c8eb1f
@ -319,7 +319,7 @@ static int lxc_abstract_unix_connect(const char *path)
|
||||
return -1;
|
||||
}
|
||||
/* addr.sun_path[0] has already been set to 0 by memset() */
|
||||
memcpy(&addr.sun_path[1], &path[1], strlen(&path[1]));
|
||||
memcpy(&addr.sun_path[1], &path[1], len);
|
||||
|
||||
ret = connect(fd, (struct sockaddr *)&addr,
|
||||
offsetof(struct sockaddr_un, sun_path) + len + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user