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>
Wed, 1 Aug 2018 14:15:25 +0000 (16:15 +0200)
commit6a815969776e3329fdffcc12c77e047e3a15be78
tree3506c0c2a8bb310d757bb6f26fb6f0a685cd6d6d
parent83325a68ad5fdfc359ab9d82a0e0da8e5fe7ede1
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/6810)

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