Commit 6f16a9cc authored by Davide Galassi's avatar Davide Galassi

MPI exp shall reject negative exponents

parent ae43b5a9
Pipeline #57666425 passed with stages
in 1 minute and 22 seconds
......@@ -6,6 +6,9 @@ int cry_mpi_exp(cry_mpi *r, const cry_mpi *b, const cry_mpi *e)
int sign = b->sign ? cry_mpi_is_odd(e) : 0;
cry_mpi t, c, one;
if (cry_mpi_is_neg(e))
return -1;
if ((res = cry_mpi_init_list(&t, &one, &c, (cry_mpi *) NULL)) != 0)
return res;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment