From 12117b2faab3d0c47799f77e0deb9260c497f1bd Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sun, 19 Jan 2025 21:28:25 +0100 Subject: [PATCH] src/gpasswd: Use correct preprocessor definition Use PASS_MAX + 1 instead of BUFSIZ to clarify where this size comes from. Technically, PASS_MAX is BUFSIZ - 1 so this is a no-op change. Just make sure that the size of pass stays in sync with agetpass. Reviewed-by: Alejandro Colomar Signed-off-by: Tobias Stoeckmann --- src/gpasswd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpasswd.c b/src/gpasswd.c index e9e111a9f..650e47929 100644 --- a/src/gpasswd.c +++ b/src/gpasswd.c @@ -818,7 +818,7 @@ static void change_passwd (struct group *gr) #endif { char *cp; - static char pass[BUFSIZ]; + static char pass[PASS_MAX + 1]; int retries; const char *salt; -- 2.47.2