dtlogin: Avoid putenv to fix issue with passing stack address
putenv doesn't copy the data, so the stack address used here is plain wrong. It _probably_ doesn't matter all that much because it's immediately followed by execv(), but let's keep things clean.
This commit is contained in:
parent
b86eff35f0
commit
fa31987221
|
|
@ -1490,10 +1490,8 @@ RespondLangCB( Widget w, XtPointer client, XtPointer call)
|
|||
/** but it does work ok. **/
|
||||
/** notice the related code in chooser.c at the **/
|
||||
/** beginning of main. **/
|
||||
char buff[128];
|
||||
if (XmToggleButtonGadgetGetState(w)) {
|
||||
snprintf(buff, sizeof(buff), "LANG=%s", (char *) client);
|
||||
putenv(buff);
|
||||
setenv("LANG", client, 1);
|
||||
execv(orig_argv[0], orig_argv);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue