Re: [PATCH v3] staging: media: atomisp: replace sprintf() with strscpy()
From: Dan Carpenter
Date: Thu Feb 26 2026 - 07:04:15 EST
On Thu, Feb 26, 2026 at 12:16:53PM +0100, tomasz.unger@xxxxxxxx wrote:
> From: Tomasz Unger <tomasz.unger@xxxxxxxx>
>
> Auditing calls to sprintf(). This code is fine because we are
> copying 9 characters into a 52 character buffer. But it would
> be cleaner to use strscpy() instead. Additionally, the 2-argument
> version of strscpy() checks at compile time that dst is an array,
> not just a pointer.
>
> This is the only sprintf() call in the whole driver.
>
> Signed-off-by: Tomasz Unger <tomasz.unger@xxxxxxxx>
> ---
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
regards,
dan carpenter