Fix invalid access 86/304786/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 23 Jan 2024 22:59:51 +0000 (07:59 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 23 Jan 2024 22:59:51 +0000 (07:59 +0900)
The array size is 2.

Change-Id: If65b54963abee9d06ca7926aedd30be698371ca9
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-process-pool/loader_mount.cc

index db264e8..853a603 100644 (file)
@@ -254,7 +254,7 @@ void LoaderMount::OnExecution() {
 
 int LoaderMount::CreatePipe(int (*pipe_fd)[2]) {
   *pipe_fd[0] = -1;
-  *pipe_fd[2] = -1;
+  *pipe_fd[1] = -1;
 
   if (pipe(*pipe_fd) == -1) {
     _E("pipe() is failed. errno(%d)", errno);