boringssl/crypto/fipsmodule/rand
David Benjamin e62bf02a13 Don't overflow state->calls on 16TiB RAND_bytes calls.
This is an extremely important and practical use case. The comment that
state->calls is bounded by the reseed interval isn't quite true. We only
check on entry to the function, which means that it may exceed it by one
call's worth. Switch it to a size_t (which doesn't actually increase
memory because the struct was already padded).

Change-Id: Ia7646fd5b4142789c1d613280223baa4cd1a4a9b
Reviewed-on: https://boringssl-review.googlesource.com/c/32804
Commit-Queue: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2018-11-02 18:33:43 +00:00
..
asm Update several assembly files from upstream. 2018-08-07 18:57:17 +00:00
ctrdrbg_test.cc Fix miscellaneous clang-tidy warnings. 2017-08-01 20:39:46 +00:00
ctrdrbg_vectors.txt Move much of rand/ into the FIPS module. 2017-04-21 22:03:18 +00:00
ctrdrbg.c Fix up CTR_DRBG_update comment. 2018-01-23 22:19:03 +00:00
internal.h Remove CTR_DRBG_STATE alignment marker. 2017-09-18 19:17:52 +00:00
rand.c Don't overflow state->calls on 16TiB RAND_bytes calls. 2018-11-02 18:33:43 +00:00
urandom.c Fix the build on glibc 2.15. 2018-10-24 17:39:48 +00:00