[PATCH] smb: client: Use snprintf in cifs_set_cifscreds
Paulo Alcantara
pc at manguebit.org
Fri Feb 27 15:03:01 UTC 2026
Thorsten Blum <thorsten.blum at linux.dev> writes:
> Replace unbounded sprintf() calls with the safer snprintf(). Avoid using
> magic numbers and use strlen() to calculate the key descriptor buffer
> size. Save the size in a local variable and reuse it for the bounded
> snprintf() calls. Remove CIFSCREDS_DESC_SIZE.
>
> Signed-off-by: Thorsten Blum <thorsten.blum at linux.dev>
> ---
> fs/smb/client/connect.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
Acked-by: Paulo Alcantara (Red Hat) <pc at manguebit.org>
More information about the samba-technical
mailing list