Fix a possible crash in BN_from_montgomery_word
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 29 Mar 2018 09:27:29 +0000 (11:27 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sat, 19 May 2018 22:30:47 +0000 (00:30 +0200)
commit2392eb77d237684a32b1290fc9e3d0e2f3b08554
tree34716bf679d4efb21fbbf8c8efbf905825cf41b1
parent4e07941373ac17086ab4e601950c4ca148e8bb31
Fix a possible crash in BN_from_montgomery_word

Thanks to Darovskikh Andrei for for reporting this issue.

Fixes: #5785
Fixes: #6302

Cherry-picked from f91e026e3832 (without test/bntest.c)

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/6310)
crypto/bn/bn_mont.c