lkml.org 
[lkml]   [2023]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
On Mon, Oct 30, 2023 at 11:12:26AM +0100, Christophe JAILLET wrote:
> The ending NULL is not taken into account by strncat(), so switch to
> snprintf() to correctly build 'debug_name'.
>
> Using snprintf() also makes the code more readable.
>
> Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> v2:
> - use snprintf() to simplify code [Dan Carpenter]
>

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

regards,
dan carpenter

\
 
 \ /
  Last update: 2023-10-30 12:07    [W:0.069 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site