]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: use memcpy_safe()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Aug 2018 06:52:46 +0000 (15:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Aug 2018 08:11:43 +0000 (17:11 +0900)
Fixes #9738.

src/core/execute.c

index a35dbac9ef12319a4bc3f0d20f87dd57f145896b..ecf0f7c4042ccfd3c4b367af261477bf4430bddf 100644 (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 {