Let buffer for current path be auto-allocated

This commit is contained in:
Arun Prakash Jana 2020-09-26 00:49:33 +05:30
parent 2e870f3879
commit 55f2a0823a
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -7657,7 +7657,7 @@ int main(int argc, char *argv[])
session = NULL; session = NULL;
} else if (argc == optind) { } else if (argc == optind) {
/* Start in the current directory */ /* Start in the current directory */
initpath = getcwd(NULL, PATH_MAX); initpath = getcwd(NULL, 0);
if (!initpath) if (!initpath)
initpath = "/"; initpath = "/";
} else { } else {