From: Bart Van Assche <bvanassche@acm.org>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
Anil Gurumurthy <anil.gurumurthy@qlogic.com>,
Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: bfa: bfad_attr.c: Optimization of the Code
Date: Thu, 05 Jun 2014 09:10:40 +0200 [thread overview]
Message-ID: <539017F0.1080503@acm.org> (raw)
In-Reply-To: <5390147F.8070803@acm.org>
On 06/05/14 08:55, Bart Van Assche wrote:
> On 06/04/14 20:08, Rickard Strandqvist wrote:
> This is ugly. Please use sprintf(buf, "%.*s\n", PAGE_SIZE - 1, str)
> instead of strncpy() + strlen().
(replying to my own e-mail)
The above should of course have read "sprintf(buf, "%.*s\n", PAGE_SIZE -
2, str)" to avoid that the terminating '\0' triggers a buffer overflow.
Bart.
next prev parent reply other threads:[~2014-06-05 7:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 18:08 [PATCH] scsi: bfa: bfad_attr.c: Optimization of the Code Rickard Strandqvist
2014-06-05 6:55 ` Bart Van Assche
2014-06-05 7:10 ` Bart Van Assche [this message]
2014-06-06 22:03 ` Rickard Strandqvist
-- strict thread matches above, loose matches on Subject: below --
2014-06-06 22:04 [PATCH] scsi: bfa: bfad_attr.c: Optimization of the code Rickard Strandqvist
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=539017F0.1080503@acm.org \
--to=bvanassche@acm.org \
--cc=JBottomley@parallels.com \
--cc=anil.gurumurthy@qlogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
--cc=sudarsana.kalluru@qlogic.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 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.