Re: [PATCH] crypto: drbg: check blocklen is non zero

2020-08-20 Thread Herbert Xu
On Thu, Aug 20, 2020 at 06:27:36AM -0700, Tom Rix wrote: > There are many divide by 0 reports.  This one got attention because it is in > crypto, where i believe problems, even false positives, should be fixed. Please don't top post. AS your bug report is a false positive I'm rejecting your patc

Re: [PATCH] crypto: drbg: check blocklen is non zero

2020-08-20 Thread Tom Rix
There are many divide by 0 reports.  This one got attention because it is in crypto, where i believe problems, even false positives, should be fixed. Tom On 8/20/20 12:15 AM, Herbert Xu wrote: > On Sun, Aug 02, 2020 at 10:12:47AM -0700, t...@redhat.com wrote: >> From: Tom Rix >> >> Clang static

Re: [PATCH] crypto: drbg: check blocklen is non zero

2020-08-20 Thread Herbert Xu
On Sun, Aug 02, 2020 at 10:12:47AM -0700, t...@redhat.com wrote: > From: Tom Rix > > Clang static analysis reports this error > > crypto/drbg.c:441:40: warning: Division by zero > padlen = (inputlen + sizeof(L_N) + 1) % (drbg_blocklen(drbg)); > ~~

Re: [PATCH] crypto: drbg: check blocklen is non zero

2020-08-02 Thread Stephan Mueller
Am Sonntag, 2. August 2020, 19:12:47 CEST schrieb t...@redhat.com: Hi Tom, > From: Tom Rix > > Clang static analysis reports this error > > crypto/drbg.c:441:40: warning: Division by zero > padlen = (inputlen + sizeof(L_N) + 1) % (drbg_blocklen(drbg)); > ~~

[PATCH] crypto: drbg: check blocklen is non zero

2020-08-02 Thread trix
From: Tom Rix Clang static analysis reports this error crypto/drbg.c:441:40: warning: Division by zero padlen = (inputlen + sizeof(L_N) + 1) % (drbg_blocklen(drbg)); ~^~~ When drbg_bocklen fails it returns 0. if (