# HG changeset patch
# User Tobias Wagner <tobias.wagner@n-design.de>
# Date 1507283998 -7200
#      Fri Oct 06 11:59:58 2017 +0200
# Node ID 316029e60e4208cb8b09e7afe836254450027c31
# Parent  65464a3074083e84441a216e9b94d8f9ad4c464f
Arithmetic error in ec_GFp_sub_5 and ec_GFp_sub_6 functions ecl_gf.c

diff -r 65464a307408 -r 316029e60e42 src/jdk.crypto.ec/share/native/libsunec/impl/ecl_gf.c
--- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_gf.c	Thu Aug 03 18:56:59 2017 +0000
+++ b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_gf.c	Fri Oct 06 11:59:58 2017 +0200
@@ -833,6 +833,7 @@
                 MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
                 MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
                 MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
+                MP_ADD_CARRY(b4, r4, r4, borrow, borrow);
         }
         MP_CHECKOK(s_mp_pad(r, 5));
         MP_DIGIT(r, 4) = r4;
@@ -908,6 +909,7 @@
                 MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
                 MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
                 MP_ADD_CARRY(b4, r4, r4, borrow, borrow);
+                MP_ADD_CARRY(b5, r5, r5, borrow, borrow);
         }
 
         MP_CHECKOK(s_mp_pad(r, 6));
