[pkg-fso-commits] [SCM] Automatic Display Manager branch, master, updated. nodm/0.3-2-25-g6b59ed6
Enrico Zini
enrico at enricozini.org
Thu Jul 23 23:44:15 UTC 2009
The following commit has been merged in the master branch:
commit 669588701e9480acf782b3a5b41bcaf8d487fa62
Author: Enrico Zini <enrico at enricozini.org>
Date: Thu Jul 23 22:31:51 2009 +0200
Do not write to strings recursively
diff --git a/nodm.c b/nodm.c
index 52c0409..07ce179 100644
--- a/nodm.c
+++ b/nodm.c
@@ -505,6 +505,7 @@ static int nodm_monitor(int argc, char **argv)
const char* opt_session = NODM_SESSION;
char xinit[BUFSIZ];
char xoptions[BUFSIZ];
+ char xoptions1[BUFSIZ];
char* cp;
int mst;
int vt_fd = -1;
@@ -558,9 +559,9 @@ static int nodm_monitor(int argc, char **argv)
string_from_env(xinit, "NODM_XINIT", "/usr/bin/xinit");
string_from_env(xoptions, "NODM_X_OPTIONS", "");
if (xoptions[0] == 0)
- snprintf(xoptions, BUFSIZ, "vt%d", vt_num);
+ snprintf(xoptions1, BUFSIZ, "vt%d", vt_num);
else
- snprintf(xoptions, BUFSIZ, "vt%d %s", vt_num, xoptions);
+ snprintf(xoptions1, BUFSIZ, "vt%d %s", vt_num, xoptions);
setenv("NODM_RUN_SESSION", "1", 1);
run_and_restart(xinit, opt_session, xoptions[0] == 0 ? NULL : xoptions, mst);
--
Automatic Display Manager
More information about the pkg-fso-commits
mailing list