On Thu, Jun 29, 2023 at 11:51:01AM +0300, Dmitry Antipov wrote: [...] > This also fixes an improper usage of 'sizeof()'. Since 'skb' is > extended with 'sizeof(mgmt->u.action.u.tdls_discover_resp) + 1' > bytes (where 1 is actually 'sizeof(mgmt->u.action.category)'), > I assume that the same number of bytes should be copied. > > Suggested-by: Brian Norris <briannorris@xxxxxxxxxxxx> I don't believe I actually *suggested* the change; I just highlighted that the size looked sketchy in the original code. :) But your change does look correct, and I don't see how we could possibly *want* to be off by 1 here, so: Reviewed-by: Brian Norris <briannorris@xxxxxxxxxxxx> > Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx> > --- > v4: fix memmove() size calculation (Brian Norris) > --- > drivers/net/wireless/marvell/mwifiex/tdls.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-)