Add parameter validation to mbedtls_ecp_restart_init()

This commit is contained in:
Hanno Becker 2018-12-18 23:44:43 +00:00
parent 486f1b33d7
commit 80f71689ee

View File

@ -244,6 +244,7 @@ static void ecp_restart_ma_free( mbedtls_ecp_restart_muladd_ctx *ctx )
*/ */
void mbedtls_ecp_restart_init( mbedtls_ecp_restart_ctx *ctx ) void mbedtls_ecp_restart_init( mbedtls_ecp_restart_ctx *ctx )
{ {
ECP_VALIDATE( ctx != NULL );
ctx->ops_done = 0; ctx->ops_done = 0;
ctx->depth = 0; ctx->depth = 0;
ctx->rsm = NULL; ctx->rsm = NULL;