[X2Go-Commits] [x2goclient] 25/197: x2goclient.cpp: fix failing exec() call for the UNIX helper utility: correctly terminate arguments vector.

git-admin at x2go.org git-admin at x2go.org
Thu Jun 30 23:52:36 CEST 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit b832b8c083ab328c34968121273953ec2c87b658
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Mar 20 04:02:06 2015 +0100

    x2goclient.cpp: fix failing exec() call for the UNIX helper utility: correctly terminate arguments vector.
---
 debian/changelog   |    2 ++
 src/x2goclient.cpp |    6 +-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fffa65b..33b7a49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -80,6 +80,8 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
       parent PID polling.
     - unixhelper.{cpp,h}: ignore SIGINT, SIGTERM, SIGPIPE, SIGQUIT, SIGUSR1
       and SIGUSR2.
+    - x2goclient.cpp: fix failing exec() call for the UNIX helper utility:
+      correctly terminate arguments vector.
   * debian/control:
     - Maintainer change in package: X2Go Developers <x2go-dev at lists.x2go.org>.
     - Uploaders: add myself. Also, force a rebuild due to the changed
diff --git a/src/x2goclient.cpp b/src/x2goclient.cpp
index 2c334e1..df53ba1 100644
--- a/src/x2goclient.cpp
+++ b/src/x2goclient.cpp
@@ -54,11 +54,7 @@ int fork_helper (int argc, char **argv) {
     }
 
     /* Add null pointer as last element. */
-    {
-      std::vector<char> *tmp = new (std::vector<char>) ();
-      tmp->push_back (0);
-      new_argv_c_str->push_back (&tmp->front ());
-    }
+    new_argv_c_str->push_back (0);
 
     if (0 != execv (new_argv_c_str->front (), &(new_argv_c_str->front ()))) {
       std::cerr << "Failed to re-execute process as UNIX cleanup helper tool: " << std::strerror (errno) << "\n"

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list