From: Nikos Mavrogiannopoulos Date: Wed, 25 Apr 2012 08:19:16 +0000 (+0200) Subject: corrected bug in scan_nz() X-Git-Tag: gnutls_3_0_21~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34af48e99a369b01f633e7c2e65274ec3280d66f;p=thirdparty%2Fgnutls.git corrected bug in scan_nz() --- diff --git a/lib/gnutls_mpi.c b/lib/gnutls_mpi.c index da6abba82b..688f399c73 100644 --- a/lib/gnutls_mpi.c +++ b/lib/gnutls_mpi.c @@ -152,7 +152,7 @@ _gnutls_mpi_scan_nz (bigint_t * ret_mpi, const void *buffer, size_t nbytes) /* MPIs with 0 bits are illegal */ - if (_gnutls_mpi_get_nbits (*ret_mpi) == 0) + if (_gnutls_mpi_cmp_ui (*ret_mpi, 0) == 0) { _gnutls_mpi_release (ret_mpi); return GNUTLS_E_MPI_SCAN_FAILED;