From e44f258bff57ec82c310c4aed40abf3af1210970 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 4 Jun 2004 20:05:34 +0000 Subject: [PATCH] Terminating a buffer string (can't remember when I did that, no time to check but shouldn't hurt) --- src/pwd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pwd.c b/src/pwd.c index 0102fb8..af6e2c6 100644 --- a/src/pwd.c +++ b/src/pwd.c @@ -62,6 +62,7 @@ static int _pwd(pwd_flag pf) perror("getcwd"); return 2; } + buf[255] = '\0'; pwd = buf; } printf("%s\n", pwd);