public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: luka.gejak@linux.dev
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723bs: clean up memcpy() in rtw_check_bcn_info
Date: Wed, 15 Apr 2026 13:07:05 +0300	[thread overview]
Message-ID: <ad9jSdK56l9eyyxi@stanley.mountain> (raw)
In-Reply-To: <20260415085638.6427-1-luka.gejak@linux.dev>

On Wed, Apr 15, 2026 at 10:56:38AM +0200, luka.gejak@linux.dev wrote:
> From: Luka Gejak <luka.gejak@linux.dev>
> 
> Move the ssid memcpy() inside the ie null-check to avoid calling it
> with a NULL-derived pointer (p + 2) when the ie is missing.
> 
> While the kernel handles 0-length memcpy() safely as a no-op, keeping
> the call outside the check is confusing and poor practice. This
> change improves code readability.
> 
> Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
> ---
> As Dan pointed out kernel handles 0-length memcpy() safely as a no-op 
> therefore it doesn't cause kernel oops or panics so in v2 changed commit
> message to move from bugfix to cleanup and removed fixes tag.

Thanks.

Reviewed-by: Dan Carpenter <error27@gmail.com>

regards,
dan carpenter


      reply	other threads:[~2026-04-15 10:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15  8:56 [PATCH v2] staging: rtl8723bs: clean up memcpy() in rtw_check_bcn_info luka.gejak
2026-04-15 10:07 ` Dan Carpenter [this message]

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=ad9jSdK56l9eyyxi@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=luka.gejak@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox