From: Joe Perches <joe@perches.com>
To: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Cc: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
Steve French <sfrench@samba.org>,
linux-cifs <linux-cifs@vger.kernel.org>,
samba-technical <samba-technical@lists.samba.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs: cifs: cifsencrypt.c: Cleaning up missing null-terminate in conjunction with strncpy
Date: Sat, 02 Aug 2014 10:33:27 -0700 [thread overview]
Message-ID: <1407000807.1835.14.camel@joe-AO725> (raw)
In-Reply-To: <CADT32eLts-tdQdHo+W3Zc1wQ6Qz8aS3TmHsm8OxmiF2fmhOW5g@mail.gmail.com>
On Sat, 2014-08-02 at 11:55 -0500, Shirish Pargaonkar wrote:
> Acked-by: Shirish Pargaonkar <spargaonkar@suse.com>
[]
> > diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
[]
> > @@ -307,7 +307,7 @@ int calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt,
> >
> > memset(password_with_pad, 0, CIFS_ENCPWD_SIZE);
> > if (password)
> > - strncpy(password_with_pad, password, CIFS_ENCPWD_SIZE);
> > + strncpy(password_with_pad, password, CIFS_ENCPWD_SIZE - 1);
Is this always correct?
next prev parent reply other threads:[~2014-08-02 17:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-26 22:28 Rickard Strandqvist
2014-08-02 16:55 ` Shirish Pargaonkar
2014-08-02 17:33 ` Joe Perches [this message]
2014-08-02 23:13 ` Rickard Strandqvist
2014-08-03 0:27 ` Joe Perches
2014-08-03 6:22 ` Shirish Pargaonkar
-- strict thread matches above, loose matches on Subject: below --
2014-06-25 10:42 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=1407000807.1835.14.camel@joe-AO725 \
--to=joe@perches.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=shirishpargaonkar@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®