From: Yu Watanabe Date: Wed, 8 Aug 2018 06:52:46 +0000 (+0900) Subject: core: use memcpy_safe() X-Git-Tag: v240~846^2~4 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=7e8d494b33cf593e332f3c710c9c26aee4b88dd9 core: use memcpy_safe() Fixes #9738. --- diff --git a/src/core/execute.c b/src/core/execute.c index a35dbac9ef1..ecf0f7c4042 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -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 {