From 9403ba88b6db31e35eb40d801cb4fff5982801dd Mon Sep 17 00:00:00 2001 From: Christophe Diederichs Date: Thu, 7 Oct 2021 13:37:05 +0100 Subject: [PATCH] check ristretto255_scalar_invert for failure --- binding.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/binding.c b/binding.c index 81605347..ef0093e0 100644 --- a/binding.c +++ b/binding.c @@ -1529,9 +1529,7 @@ napi_value sn_crypto_core_ristretto255_scalar_invert (napi_env env, napi_callbac SN_ASSERT_LENGTH(recip_size, crypto_core_ristretto255_SCALARBYTES, "recip") SN_ASSERT_LENGTH(s_size, crypto_core_ristretto255_SCALARBYTES, "s") - crypto_core_ristretto255_scalar_invert(recip_data, s_data); - - return NULL; + SN_RETURN(crypto_core_ristretto255_scalar_invert(recip_data, s_data), "point inversion failed") } napi_value sn_crypto_core_ristretto255_scalar_negate (napi_env env, napi_callback_info info) {