]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/gpasswd: Use correct preprocessor definition
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 19 Jan 2025 20:28:25 +0000 (21:28 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 21 Jan 2025 15:24:26 +0000 (16:24 +0100)
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 <alx@kernel.org>
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
src/gpasswd.c

index e9e111a9fb7a3f91a325dcad185aa33cc3dd2266..650e479290e6fa2753774e827b7efe8a3edb5ff1 100644 (file)
@@ -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;