summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-10-14 23:08:19 +0200
committerBoris Faure <billiob@gmail.com>2019-10-17 09:58:40 +0200
commite9b2d22ff715eea01cb646f3361af9147bc5de1e (patch)
tree6bdda27a0ac4a7758703401d117d10af35f554cc /src
parent5e5ac579b5f986550ca2877d5d14123157307c74 (diff)
main: putenv() can't use stack mem as it might become part of env
and use later. Avoid stack-use-after-scope.
Diffstat (limited to 'src')
-rw-r--r--src/bin/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 7bd49b6..46d303b 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -70,7 +70,7 @@ main_ipc_new(Ipc_Instance *inst)
70 char buf[4096]; 70 char buf[4096];
71 71
72 snprintf(buf, sizeof(buf), "DESKTOP_STARTUP_ID=%s", inst->startup_id); 72 snprintf(buf, sizeof(buf), "DESKTOP_STARTUP_ID=%s", inst->startup_id);
73 putenv(buf); 73 putenv(strdup(buf));
74 } 74 }
75 ecore_app_args_get(&pargc, &pargv); 75 ecore_app_args_get(&pargc, &pargv);
76 nargc = 1; 76 nargc = 1;