diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-01-26 09:16:36 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-01-26 09:16:36 +0100 |
commit | 52d140d6ee54544ba01507c75df832e92870f877 (patch) | |
tree | 0c301f1f9781974741bb82cb27685311aeace7da /lib/auth/srp.c | |
parent | a02809a1a715e65fcd4a3e1577dfdbc5ab43ed66 (diff) | |
download | gnutls-52d140d6ee54544ba01507c75df832e92870f877.tar.gz |
updated prototype of _gnutls_mpi_modm
Diffstat (limited to 'lib/auth/srp.c')
-rw-r--r-- | lib/auth/srp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/auth/srp.c b/lib/auth/srp.c index 3966b0b9b2..7e579e5cc0 100644 --- a/lib/auth/srp.c +++ b/lib/auth/srp.c @@ -71,10 +71,14 @@ inline static int check_param_mod_n(bigint_t a, bigint_t n, int is_a) int ret, err = 0; bigint_t r; - r = _gnutls_mpi_modm(NULL, a, n); - if (r == NULL) { - gnutls_assert(); - return GNUTLS_E_MEMORY_ERROR; + ret = _gnutls_mpi_init(&r); + if (ret < 0) + return gnutls_assert_val(ret); + + ret = _gnutls_mpi_modm(r, a, n); + if (ret < 0) { + _gnutls_mpi_release(&r); + return gnutls_assert_val(ret); } ret = _gnutls_mpi_cmp_ui(r, 0); |