[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZPbkJOPsx4as96D/@gondor.apana.org.au>
Date: Tue, 5 Sep 2023 16:17:40 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Marion & Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Longfang Liu <liulongfang@...wei.com>,
"David S. Miller" <davem@...emloft.net>,
Zaibo Xu <xuzaibo@...wei.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-crypto@...r.kernel.org
Subject: Re: [PATCH] crypto: hisilicon/hpre - Fix a erroneous check after
snprintf()
On Tue, Sep 05, 2023 at 07:27:47AM +0200, Marion & Christophe JAILLET wrote:
>
> Some debugfs dir of file way be left around. Is it what your are talking
> about?
Yes all allocated resources should be freed on the error path.
> > The other snprintf in the same file also looks suspect.
>
> It looks correct to me.
>
> And HPRE_DBGFS_VAL_MAX_LEN being 20, it doesn't really matter. The string
> can't be truncated with just a "%u\n".
Well if you're going to go with that line of reasoning then this
case ("cluster%d") can't overflow either, no?
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists