]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
corrected bug in scan_nz()
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 25 Apr 2012 08:19:16 +0000 (10:19 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 25 Apr 2012 08:19:16 +0000 (10:19 +0200)
lib/gnutls_mpi.c

index da6abba82b607eb213c05bd5e655212d17985c3a..688f399c7394d7421f68c1fee39694d8dd62675b 100644 (file)
@@ -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;