crypto: drbg - fix drbg_generate return val check
authorStephan Mueller <smueller@chronox.de>
Sat, 18 Apr 2015 17:35:45 +0000 (19:35 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 21 Apr 2015 01:14:45 +0000 (09:14 +0800)
commit082eb10ba97449a370e58f746522a4b90bcaee78
tree9b5c9dce71039eab77779297bdfa8f5e57a306fe
parent04a34d4680e75e9be63204b3a7b51a6abe3ce35a
crypto: drbg - fix drbg_generate return val check

The drbg_generate returns 0 in success case. That means that
drbg_generate_long will always only generate drbg_max_request_bytes at
most. Longer requests will be truncated to drbg_max_request_bytes.

Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/drbg.c