[gnome-builder] subprocess: fix copy of FD map into breakout subprocess



commit 1482d0079895cd6996123c40de4d12c69f14cc81
Author: Christian Hergert <chergert redhat com>
Date:   Sun Mar 19 17:06:20 2017 -0700

    subprocess: fix copy of FD map into breakout subprocess
    
    We were only copying half the amount of data, causing us to potentially
    map in the wrong FDs as well as close the wrong FDs.

 libide/subprocess/ide-breakout-subprocess.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/subprocess/ide-breakout-subprocess.c b/libide/subprocess/ide-breakout-subprocess.c
index 2eb2d77..d71cae7 100644
--- a/libide/subprocess/ide-breakout-subprocess.c
+++ b/libide/subprocess/ide-breakout-subprocess.c
@@ -1789,7 +1789,7 @@ _ide_breakout_subprocess_new (const gchar                 *cwd,
 
   ret->fd_mapping = g_new0 (IdeBreakoutFdMapping, fd_mapping_len);
   ret->fd_mapping_len = fd_mapping_len;
-  memcpy (ret->fd_mapping, fd_mapping, sizeof(gint) * fd_mapping_len);
+  memcpy (ret->fd_mapping, fd_mapping, sizeof(IdeBreakoutFdMapping) * fd_mapping_len);
 
   if (!g_initable_init (G_INITABLE (ret), cancellable, error))
     return NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]