We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 317f940 + 80bb77e commit 0ed1df6Copy full SHA for 0ed1df6
library/ecdsa.c
@@ -172,11 +172,11 @@ static void ecdsa_restart_det_free( mbedtls_ecdsa_restart_det_ctx *ctx )
172
}
173
#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
174
175
-#define ECDSA_RS_ECP &rs_ctx->ecp
+#define ECDSA_RS_ECP ( rs_ctx == NULL ? NULL : &rs_ctx->ecp )
176
177
/* Utility macro for checking and updating ops budget */
178
#define ECDSA_BUDGET( ops ) \
179
- MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, &rs_ctx->ecp, ops ) );
+ MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, ECDSA_RS_ECP, ops ) );
180
181
/* Call this when entering a function that needs its own sub-context */
182
#define ECDSA_RS_ENTER( SUB ) do { \
0 commit comments