Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH] abspath: increase array size of cwd variable to PATH_MAX

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:04

Wang Hui [off-list ref] writes:
quoted hunk
diff --git a/abspath.c b/abspath.c
index f04ac18..2ce1db9 100644
--- a/abspath.c
+++ b/abspath.c
@@ -24,7 +24,7 @@ int is_directory(const char *path)
 const char *real_path(const char *path)
 {
 	static char bufs[2][PATH_MAX + 1], *buf = bufs[0], *next_buf = bufs[1];
-	char cwd[1024] = "";
+	char cwd[PATH_MAX] = "";
Thanks.

This does not make things worse but in the longer term we should move away
from using PATH_MAX in general.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help