< prev index next >
src/jdk.crypto.ec/share/native/libsunec/impl/mpi.c
Print this page
rev 16167 : 8170525: Fix minor issues in awt coding
Summary: Also fixes some issues in ece coding.
Reviewed-by: vinnie
*** 1,7 ****
/*
! * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
--- 1,7 ----
/*
! * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
*** 32,42 ****
*
* Contributor(s):
* Netscape Communications Corporation
* Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
*
! * Last Modified Date from the Original Code: June 2014
*********************************************************************** */
/* Arbitrary precision integer arithmetic library */
#include "mpi-priv.h"
--- 32,42 ----
*
* Contributor(s):
* Netscape Communications Corporation
* Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
*
! * Last Modified Date from the Original Code: Nov 2016
*********************************************************************** */
/* Arbitrary precision integer arithmetic library */
#include "mpi-priv.h"
*** 657,666 ****
--- 657,667 ----
if((res = s_mp_sqr(&x)) != MP_OKAY)
goto CLEANUP;
}
+ s.flag = (mp_flag)0;
s_mp_exch(&s, c);
CLEANUP:
mp_clear(&x);
X:
*** 1607,1616 ****
--- 1608,1618 ----
if((res = s_mp_sqr(&x)) != MP_OKAY ||
(res = mp_mod(&x, m, &x)) != MP_OKAY)
goto CLEANUP;
}
+ s.flag = (mp_flag)0;
s_mp_exch(&s, c);
CLEANUP:
mp_clear(&x);
X:
*** 4181,4190 ****
--- 4183,4193 ----
mp_err s_mp_sqr(mp_int *a)
{
mp_err res;
mp_int tmp;
+ tmp.flag = (mp_flag)0;
if((res = mp_init_size(&tmp, 2 * USED(a), FLAG(a))) != MP_OKAY)
return res;
res = mp_sqr(a, &tmp);
if (res == MP_OKAY) {
*** 4218,4227 ****
--- 4221,4232 ----
mp_err res;
mp_digit d;
mp_digit div_msd;
int ix;
+ t.dp = (mp_digit)0;
+
if(mp_cmp_z(div) == 0)
return MP_RANGE;
/* Shortcut if divisor is power of two */
if((ix = s_mp_ispow2(div)) >= 0) {
< prev index next >