All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Kalle Valo <kvalo@kernel.org>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/3] [v4] wifi: mwifiex: fix fortify warning
Date: Thu, 29 Jun 2023 12:52:55 -0700	[thread overview]
Message-ID: <ZJ3hF53JG3CtA0KZ@google.com> (raw)
In-Reply-To: <20230629085115.180499-2-dmantipov@yandex.ru>

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@chromium.org>

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@chromium.org>

> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
> v4: fix memmove() size calculation (Brian Norris)
> ---
>  drivers/net/wireless/marvell/mwifiex/tdls.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

  reply	other threads:[~2023-06-29 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29  8:51 [PATCH 1/3] [v4] wifi: mwifiex: prefer strscpy() over strlcpy() Dmitry Antipov
2023-06-29  8:51 ` [PATCH 2/3] [v4] wifi: mwifiex: fix fortify warning Dmitry Antipov
2023-06-29 19:52   ` Brian Norris [this message]
2023-06-29  8:51 ` [PATCH 3/3] [v4] wifi: mwifiex: drop BUG_ON() from TX error handling Dmitry Antipov
2023-06-29 19:16   ` Simon Horman
2023-06-29 20:12   ` Brian Norris
2023-06-29 19:50 ` [PATCH 1/3] [v4] wifi: mwifiex: prefer strscpy() over strlcpy() Brian Norris
2023-07-25 15:14 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZJ3hF53JG3CtA0KZ@google.com \
    --to=briannorris@chromium.org \
    --cc=dmantipov@yandex.ru \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.