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:
Patrick Georgi 2025-12-14 00:16:31 +01:00
parent b86eff35f0
commit fa31987221
1 changed files with 1 additions and 3 deletions

View File

@ -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 {