Re: [PATCH] smb: client: Use snprintf in cifs_set_cifscreds

From: Paulo Alcantara

Date: Fri Feb 27 2026 - 10:07:14 EST


Thorsten Blum <thorsten.blum@xxxxxxxxx> 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@xxxxxxxxx>
> ---
> fs/smb/client/connect.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)

Acked-by: Paulo Alcantara (Red Hat) <pc@xxxxxxxxxxxxx>