From 4e048f1749757d4ea83f8bab414fc47015119f8a Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Mon, 29 Jan 2024 10:46:19 +0100 Subject: [PATCH] bignum: removing usage of MPI_VALIDATE_RET() Signed-off-by: Valerio Setti --- library/bignum.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/bignum.c b/library/bignum.c index 6a80720ce..d3d72ab74 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -606,7 +606,6 @@ int mbedtls_mpi_write_string(const mbedtls_mpi *X, int radix, size_t n; char *p; mbedtls_mpi T; - MPI_VALIDATE_RET(buflen == 0 || buf != NULL); if (radix < 2 || radix > 16) { return MBEDTLS_ERR_MPI_BAD_INPUT_DATA; @@ -809,7 +808,6 @@ int mbedtls_mpi_read_binary(mbedtls_mpi *X, const unsigned char *buf, size_t buf { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; const size_t limbs = CHARS_TO_LIMBS(buflen); - MPI_VALIDATE_RET(buflen == 0 || buf != NULL); /* Ensure that target MPI has exactly the necessary number of limbs */ MBEDTLS_MPI_CHK(mbedtls_mpi_resize_clear(X, limbs));