Re: [PATCH] pinctrl: fix buffer size for pinctrl_generic_set_state_prefix()

2022-10-11 Thread Tom Rini
On Wed, Sep 07, 2022 at 12:11:42PM +0100, John Keeping wrote: > This buffer has the concatenated prefix and name written into it, so it > must be large enough to cover both strings plus the terminating NUL. > > Fixes: 92c4a95ec7 ("pinctrl: Add new function > pinctrl_generic_set_state_prefix()")

Re: [PATCH] pinctrl: fix buffer size for pinctrl_generic_set_state_prefix()

2022-09-07 Thread Simon Glass
On Wed, 7 Sept 2022 at 05:15, Pali Rohár wrote: > > On Wednesday 07 September 2022 12:11:42 John Keeping wrote: > > This buffer has the concatenated prefix and name written into it, so it > > must be large enough to cover both strings plus the terminating NUL. > > You are right. Not sure why I

Re: [PATCH] pinctrl: fix buffer size for pinctrl_generic_set_state_prefix()

2022-09-07 Thread Pali Rohár
On Wednesday 07 September 2022 12:11:42 John Keeping wrote: > This buffer has the concatenated prefix and name written into it, so it > must be large enough to cover both strings plus the terminating NUL. You are right. Not sure why I put there sizeof("pins") (maybe old version when name was only

[PATCH] pinctrl: fix buffer size for pinctrl_generic_set_state_prefix()

2022-09-07 Thread John Keeping
This buffer has the concatenated prefix and name written into it, so it must be large enough to cover both strings plus the terminating NUL. Fixes: 92c4a95ec7 ("pinctrl: Add new function pinctrl_generic_set_state_prefix()") Signed-off-by: John Keeping --- drivers/pinctrl/pinctrl-generic.c | 2