boringssl/crypto/bn
David Benjamin 074cc04022 Reject negative shifts for BN_rshift and BN_lshift.
The functions BN_rshift and BN_lshift shift their arguments to the right or
left by a specified number of bits. Unpredicatable results (including
crashes) can occur if a negative number is supplied for the shift value.

Thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke and Filip Palian
for discovering and reporting this issue.

(Imported from upstream's 7cc18d8158b5fc2676393d99b51c30c135502107.)

Change-Id: Ib9f5e410a46df3d7f02a61374807fba209612bd3
Reviewed-on: https://boringssl-review.googlesource.com/4892
Reviewed-by: Adam Langley <agl@google.com>
2015-05-27 21:59:35 +00:00
..
asm Don't use x86_64-gcc.c with NO_ASM. 2015-05-15 22:23:49 +00:00
add.c Inital import. 2014-06-20 13:17:32 -07:00
bn_test.cc Require source files define __STDC_FORMAT_MACROS to use BN FMT macros. 2015-05-11 18:38:08 +00:00
bn.c Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00
CMakeLists.txt Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
cmp.c Inital import. 2014-06-20 13:17:32 -07:00
convert.c Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00
ctx.c Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00
div.c Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00
exponentiation.c Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00
gcd.c Add some missing error failure checks. 2015-02-17 20:55:56 +00:00
generic.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
internal.h Require source files define __STDC_FORMAT_MACROS to use BN FMT macros. 2015-05-11 18:38:08 +00:00
kronecker.c Inital import. 2014-06-20 13:17:32 -07:00
montgomery.c Convert BN_MONT_CTX to new-style locking. 2015-04-14 20:10:27 +00:00
mul.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
prime.c Avoid undefined behavior in probable_prime. 2015-03-19 11:36:49 +00:00
random.c Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00
rsaz_exp.c Support building with PNaCl. 2014-07-11 19:04:04 +00:00
rsaz_exp.h Convert all zero-argument functions to '(void)' 2014-08-21 01:06:07 +00:00
shift.c Reject negative shifts for BN_rshift and BN_lshift. 2015-05-27 21:59:35 +00:00
sqrt.c Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00