another WIZKIT fix
if $HOME is not set, don't use uninitialized buffer as the filename to open
This commit is contained in:
@@ -1642,6 +1642,7 @@ fopen_wizkit_file()
|
|||||||
Sprintf(tmp_wizkit, "%s/%s", envp, wizkit);
|
Sprintf(tmp_wizkit, "%s/%s", envp, wizkit);
|
||||||
if ((fp = fopenp(tmp_wizkit, "r")) != (FILE *)0)
|
if ((fp = fopenp(tmp_wizkit, "r")) != (FILE *)0)
|
||||||
return(fp);
|
return(fp);
|
||||||
|
else Strcpy(tmp_wizkit, wizkit);
|
||||||
else if (errno != ENOENT) {
|
else if (errno != ENOENT) {
|
||||||
/* e.g., problems when setuid NetHack can't search home
|
/* e.g., problems when setuid NetHack can't search home
|
||||||
* directory restricted to user */
|
* directory restricted to user */
|
||||||
|
|||||||
Reference in New Issue
Block a user