From c40188e40e73c4ccca3a331eaf405c19b40d78e5 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Tue, 26 Sep 2017 10:00:23 -0500 Subject: [PATCH] Since cwd is a path, use PATH_MAX and not NAME_MAX --- src/wutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wutil.cpp b/src/wutil.cpp index b9151db57..a65a76481 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -137,7 +137,7 @@ bool wreaddir_for_dirs(DIR *dir, wcstring *out_name) { } const wcstring wgetcwd() { - char cwd[NAME_MAX]; + char cwd[PATH_MAX]; char *res = getcwd(cwd, sizeof(cwd)); if (res) { return str2wcstring(res);