Fix invalid access
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 23:13:01 +0000 (08:13 +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 db264e88beec91ba14561154425659c82ba46567..853a6035130619735d40977a0ba167ea7109c256 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);