mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Ricardo Lopes <ricardoapl.dev@gmail.com>
Cc: manishc@marvell.com, GR-Linux-NIC-Dev@marvell.com,
	coiby.xu@gmail.com, gregkh@linuxfoundation.org,
	netdev@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: qlge: Replace strncpy with strscpy
Date: Fri, 6 Oct 2023 09:49:14 +0300	[thread overview]
Message-ID: <869f4059-1fce-49e3-9edf-8bfa42aba4a6@kadam.mountain> (raw)
In-Reply-To: <0b78b29f-2a84-487c-a43b-f8d3fa20d935@kadam.mountain>

On Fri, Oct 06, 2023 at 09:42:41AM +0300, Dan Carpenter wrote:
> On Thu, Oct 05, 2023 at 08:14:55PM +0100, Ricardo Lopes wrote:
> > Avoid read overflows and other misbehavior due to missing termination.
> > 
> 
> There aren't any read overflows in the current code.
> 

So when you're reviewing these to look for read overflows, a string
literal isn't going to overflow.  So that makes the last two obvious.
But for the first one you have to review the caller qlge_gen_reg_dump()
and the last parameter passed to qlge_build_coredump_seg_header() is
always a string literal so that's obvious too.

It's not really that much work to check for this.

regards,
dan carpenter


  reply	other threads:[~2023-10-06  6:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 19:14 Ricardo Lopes
2023-10-06  6:42 ` Dan Carpenter
2023-10-06  6:49   ` Dan Carpenter [this message]
2023-10-06 13:32 ` Greg KH
2023-10-06 15:30   ` Ricardo Lopes
2023-10-06 15:36     ` Dan Carpenter

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=869f4059-1fce-49e3-9edf-8bfa42aba4a6@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=GR-Linux-NIC-Dev@marvell.com \
    --cc=coiby.xu@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=manishc@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=ricardoapl.dev@gmail.com \
    /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

all inboxes | Powered by JetHome®