boringssl/crypto
David Benjamin 719220ec8e Get overflow checks right in BN_bin2bn.
BN_bin2bn takes a size_t as it should, but it passes that into bn_wexpand which
takes unsigned. Switch bn_wexpand and bn_expand to take size_t before they
check bounds against INT_MAX.

BIGNUM itself still uses int everywhere and we may want to audit all the
arithmetic at some point. Although I suspect having bn_expand require that the
number of bits fit in an int is sufficient to make everything happy, unless
we're doing interesting arithmetic on the number of bits somewhere.

Change-Id: Id191a4a095adb7c938cde6f5a28bee56644720c6
Reviewed-on: https://boringssl-review.googlesource.com/5680
Reviewed-by: Adam Langley <agl@google.com>
2015-08-17 20:30:00 +00:00
..
aes Convert remaining Latin-1 files to UTF-8. 2015-07-29 19:22:55 +00:00
asn1 Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
base64 Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
bio Avoid using |WIN32| and use |OPENSSL_WINDOWS| instead. 2015-07-31 22:34:34 +00:00
bn Get overflow checks right in BN_bin2bn. 2015-08-17 20:30:00 +00:00
buf Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
bytestring Make CBB_len return a length, not remaining. 2015-07-09 19:20:09 +00:00
chacha Emit #if guards for ARM assembly files. 2015-06-23 21:00:32 +00:00
cipher Remove superfluous “!= 0” in if. 2015-08-17 19:12:07 +00:00
cmac Remove BIO dependency from cmac_test. 2015-08-07 01:53:01 +00:00
conf Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
des Clean up the DES_key_schedule logic. 2015-08-07 01:55:59 +00:00
dh Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
digest Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
dsa Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
ec Clean up weirdness in initializing EC_GROUP cofactor & order. 2015-08-07 02:04:09 +00:00
ecdh Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
ecdsa Improve error checking of some |BN_CTX_get| callers. 2015-08-07 00:50:17 +00:00
engine
err Avoid using |WIN32| and use |OPENSSL_WINDOWS| instead. 2015-07-31 22:34:34 +00:00
evp Fix warning about unused |EVP_PKEY_METHOD.ctrl_str|. 2015-08-07 16:11:08 +00:00
hkdf Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
hmac Fix typo in |HMAC_CTX_cleanup|. 2015-07-16 20:38:54 +00:00
lhash Fix some typos in license headers. 2015-07-29 19:23:51 +00:00
md4 Fix integer types in low-level hash functions. 2015-06-01 22:12:21 +00:00
md5 Fix some typos in license headers. 2015-07-29 19:23:51 +00:00
modes Remove BIO dependency from cmac_test. 2015-08-07 01:53:01 +00:00
obj Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
pem Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
perlasm Emit #if guards for ARM assembly files. 2015-06-23 21:00:32 +00:00
pkcs8 Consistently participate in err for PKCS12_* functions. 2015-08-05 18:53:06 +00:00
poly1305 Fix Windows build. 2015-07-10 19:07:24 +00:00
rand Fix CRYPTO_hwrand comment. 2015-08-07 16:10:41 +00:00
rc4 Convert remaining Latin-1 files to UTF-8. 2015-07-29 19:22:55 +00:00
rsa Avoid a copy when using RSA_PADDING_NONE. 2015-08-07 23:53:09 +00:00
sha Convert remaining Latin-1 files to UTF-8. 2015-07-29 19:22:55 +00:00
stack Remove unnecessary NULL checks, part 4. 2015-05-04 23:13:12 +00:00
test Remove BIO dependency from cmac_test. 2015-08-07 01:53:01 +00:00
x509 Reserve ex_data index zero for app_data. 2015-07-20 16:56:34 +00:00
x509v3 Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
arm_arch.h
CMakeLists.txt Replace cpuid assembly with C code. 2015-07-20 18:59:44 +00:00
constant_time_test.c
cpu-arm-asm.S
cpu-arm.c Fix more warnings about old-style prototypes. 2015-08-04 02:09:39 +00:00
cpu-intel.c Surround immintrin.h includes with warning pragmas. 2015-07-20 20:08:26 +00:00
crypto.c Fix |SSLeay|. 2015-05-20 17:44:44 +00:00
directory_posix.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory_win.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory.h
ex_data.c Reserve ex_data index zero for app_data. 2015-07-20 16:56:34 +00:00
header_removed.h
internal.h Reserve ex_data index zero for app_data. 2015-07-20 16:56:34 +00:00
mem.c Fix some typos in license headers. 2015-07-29 19:23:51 +00:00
refcount_c11.c Cast refcounts to _Atomic before use. 2015-05-20 13:39:22 -07:00
refcount_lock.c Add infrastructure for reference counts. 2015-05-20 19:14:59 +00:00
refcount_test.c Specify argc and argv arguments to refcount_test:main. 2015-05-20 13:49:41 -07:00
thread_none.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_pthread.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_test.c Use the correct case for Windows headers. 2015-06-09 21:38:04 +00:00
thread_win.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread.c Remove leftovers of the old-style locks. 2015-05-20 19:18:44 +00:00
time_support.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00