[PATCH] firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()

Dan Carpenter dan.carpenter at linaro.org
Mon Oct 30 01:02:48 PDT 2023


On Mon, Oct 30, 2023 at 11:00:59AM +0300, Dan Carpenter wrote:
> On Sun, Oct 29, 2023 at 08:52:36AM +0100, Christophe JAILLET wrote:
> > The ending NULL is not taken into account by strncat(), so switch to
> > strlcat() to correctly compute the size of the available memory when
> > building 'debug_name'.
> > 
> > Because of the difference in the return type between strncat() and
> > strlcat(), some code shuffling is needed.
> > 
> > Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
> 
> The fixes tag isn't really required.

Ah sorry.  It's an off by one.  Yeah, that's a bug even if it doesn't
affect runtime.  I don't know why I didn't read this commit message
better...

regards,
dan carpenter




More information about the linux-arm-kernel mailing list