Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABgxDo+puf5P__TDXP5kG6mgCLejxuEwWY0yt-+kPUj2qmCFrQ@mail.gmail.com>
Date: Thu, 4 Mar 2021 11:08:39 +0100
From: Romain Perier <romain.perier@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Kees Cook <keescook@...omium.org>, 
	Kernel Hardening <kernel-hardening@...ts.openwall.com>, 
	"David S. Miller" <davem@...emloft.net>, linux-crypto@...r.kernel.org, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 02/20] crypto: Manual replacement of the deprecated
 strlcpy() with return values

Le jeu. 4 mars 2021 à 05:37, Herbert Xu <herbert@...dor.apana.org.au> a
écrit :

> On Mon, Feb 22, 2021 at 04:12:13PM +0100, Romain Perier wrote:
> >
> > diff --git a/crypto/lrw.c b/crypto/lrw.c
> > index bcf09fbc750a..4d35f4439012 100644
> > --- a/crypto/lrw.c
> > +++ b/crypto/lrw.c
> > @@ -357,10 +357,10 @@ static int lrw_create(struct crypto_template
> *tmpl, struct rtattr **tb)
> >        * cipher name.
> >        */
> >       if (!strncmp(cipher_name, "ecb(", 4)) {
> > -             unsigned len;
> > +             ssize_t len;
> >
> > -             len = strlcpy(ecb_name, cipher_name + 4, sizeof(ecb_name));
> > -             if (len < 2 || len >= sizeof(ecb_name))
> > +             len = strscpy(ecb_name, cipher_name + 4, sizeof(ecb_name));
> > +             if (len == -E2BIG || len < 2)
>
> len == -E2BIG is superfluous as len < 2 will catch it anyway.
>
> Thanks,
>
>
Hello,

Yeah that's fixed in v2.

Thanks,
Romain

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.