[6.0] e993bda6a Import from VTest: Don't use explicit buffer size with no buffer

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Oct 25 07:01:08 UTC 2021


commit e993bda6a3a5051d43c176e6efb39ece1e95c782
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Oct 15 07:35:04 2020 +0000

    Import from VTest: Don't use explicit buffer size with no buffer

diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index ee9b74c10..4b4f8fa11 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -552,7 +552,7 @@ main(int argc, char * const *argv)
 	else
 		tmppath = strdup("/tmp");
 
-	cwd = getcwd(NULL, PATH_MAX);
+	cwd = getcwd(NULL, 0);
 	extmacro_def("pwd", "%s", cwd);
 
 	vmod_path = NULL;


More information about the varnish-commit mailing list