]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/, src/: Use SNPRINTF() instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Sat, 26 Aug 2023 10:32:32 +0000 (12:32 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 15 Dec 2023 15:41:47 +0000 (16:41 +0100)
commitcf9cc6963c7426acf457145cde7cd315cb8c2b4d
tree2c7d9d56587f7ac03cde4b8329a312c57984df7b
parent8c6634d9bc625eb301502e32790e90e6a01cf420
lib/, src/: Use SNPRINTF() instead of its pattern

The variable declarations for the buffers have been aligned in this
commit, so that they appear in the diff, making it easier to review.

Some important but somewhat tangent changes included in this commit:

-  lib/nss.c: The size was being defined as 65, but then used as 64.
   That was a bug, although not an important one; we were just wasting
   one byte.  Fix that while we replace snprintf() by SNPRINTF(), which
   will get the size from sizeof(), and thus will use the real size.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
18 files changed:
lib/commonio.c
lib/env.c
lib/get_pid.c
lib/hushed.c
lib/nss.c
lib/pwauth.c
lib/shell.c
lib/subordinateio.c
lib/user_busy.c
src/chage.c
src/chfn.c
src/gpasswd.c
src/login.c
src/newgrp.c
src/newusers.c
src/su.c
src/useradd.c
src/vipw.c