Fix BN_mod_word bug
authorMatt Caswell <matt@openssl.org>
Tue, 31 May 2016 10:28:14 +0000 (11:28 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 7 Jun 2016 20:58:46 +0000 (21:58 +0100)
commite82fd1b4574c8908b2c3bb68e1237f057a981820
treeb12f6f05737e2922f1e287b1d0bfa5eb26511530
parentb7d0f2834e139a20560d64c73e2565e93715ce2b
Fix BN_mod_word bug

On systems where we do not have BN_ULLONG (e.g. typically 64 bit systems)
then BN_mod_word() can return incorrect results if the supplied modulus is
too big.

RT#4501

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 37258dadaa9e36db4b96a3aa54aa6c67136160cc)
crypto/bn/bn_word.c