core: use memcpy_safe()

Fixes #9738.
This commit is contained in:
Yu Watanabe 2018-08-08 15:52:46 +09:00
parent a6aadf4ae0
commit 7e8d494b33
1 changed files with 1 additions and 1 deletions

View File

@ -3216,7 +3216,7 @@ static int exec_child(
}
fds_with_exec_fd = newa(int, n_fds + 1);
memcpy(fds_with_exec_fd, fds, n_fds * sizeof(int));
memcpy_safe(fds_with_exec_fd, fds, n_fds * sizeof(int));
fds_with_exec_fd[n_fds] = exec_fd;
n_fds_with_exec_fd = n_fds + 1;
} else {