From: Tobias Stoeckmann Date: Sun, 19 Jan 2025 20:28:25 +0000 (+0100) Subject: src/gpasswd: Use correct preprocessor definition X-Git-Tag: 4.17.3~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12117b2faab3d0c47799f77e0deb9260c497f1bd;p=thirdparty%2Fshadow.git 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 --- 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;