diff --git a/library/bignum.c b/library/bignum.c index a0964e348..0aee14924 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -198,7 +198,7 @@ int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y ) if( X == Y ) return( 0 ); - if( Y->p == NULL ) + if( Y->n == 0 ) { mbedtls_mpi_free( X ); return( 0 );