------------------------------------------------------------
revno: 1443
committer: James Hunt <[email protected]>
branch nick: upstart
timestamp: Mon 2013-03-04 09:55:23 +0000
message:
  * init/session.c: session_from_dbus(): Fixed off-by-one
    readlink error.
modified:
  ChangeLog
  init/session.c


--
lp:upstart
https://code.launchpad.net/~upstart-devel/upstart/trunk

Your team Upstart Reviewers is subscribed to branch lp:upstart.
To unsubscribe from this branch go to 
https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'ChangeLog'
--- ChangeLog	2013-03-01 08:42:36 +0000
+++ ChangeLog	2013-03-04 09:55:23 +0000
@@ -1,3 +1,8 @@
+2013-03-04  James Hunt  <[email protected]>
+
+	* init/session.c: session_from_dbus(): Fixed off-by-one
+	  readlink error.
+
 2013-02-27  James Hunt  <[email protected]>
 
 	* Removal of gcc 'malloc' function attribute resulting from

=== modified file 'init/session.c'
--- init/session.c	2013-02-27 11:46:04 +0000
+++ init/session.c	2013-03-04 09:55:23 +0000
@@ -184,7 +184,7 @@
 	/* Look up the root path for retrieved pid */
 	symlink = NIH_MUST (nih_sprintf (NULL, "/proc/%lu/root",
 				unix_process_id));
-	len = readlink (symlink, root, sizeof root);
+	len = readlink (symlink, root, sizeof (root)-1);
 	if (len < 0)
 		return NULL;
 

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to