Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix segmentation fault when random token
[src/app-framework-binder.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
91c7aae
..
bffcb38
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-397,6
+397,7
@@
static int execute_command()
{
struct sigaction siga;
char port[20];
{
struct sigaction siga;
char port[20];
+ const char *token;
int rc;
/* check whether a command is to execute or not */
int rc;
/* check whether a command is to execute or not */
@@
-427,8
+428,9
@@
static int execute_command()
}
else {
/* instanciate arguments and environment */
}
else {
/* instanciate arguments and environment */
- if (instanciate_command_args(port, config->token) >= 0
- && instanciate_environ(port, config->token) >= 0) {
+ token = afb_session_initial_token();
+ if (instanciate_command_args(port, token) >= 0
+ && instanciate_environ(port, token) >= 0) {
/* run */
if (!SELF_PGROUP)
setpgid(0, 0);
/* run */
if (!SELF_PGROUP)
setpgid(0, 0);