bn/bn_mod.c: harmonize BN_mod_add_quick with original implementation.
authorAndy Polyakov <appro@openssl.org>
Wed, 25 Jul 2018 08:29:51 +0000 (10:29 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 27 Jul 2018 12:50:24 +0000 (14:50 +0200)
commited04bcf67426888e8f8556b9eb37e9e2cf4eb04b
tree9c849092fbcbc68b385874c3b84cb8f24361b004
parente1c495db1d48c4a8c467d4a5e692e991528d8618
bn/bn_mod.c: harmonize BN_mod_add_quick with original implementation.

New implementation failed to correctly reset r->neg flag. Spotted by
OSSFuzz.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6796)

(cherry picked from commit 70a579ae2f37437a1e02331eeaa84e1b68ba021e)
crypto/bn/bn_mod.c