Fix missing NULL check in MPI

This commit is contained in:
Manuel Pégourié-Gonnard 2015-04-29 17:02:01 +02:00
parent d97828e7af
commit 770b5e1e9e
5 changed files with 30 additions and 1 deletions

View file

@ -356,6 +356,9 @@ size_t mpi_msb( const mpi *X )
{
size_t i, j;
if( X->n == 0 )
return( 0 );
for( i = X->n - 1; i > 0; i-- )
if( X->p[i] != 0 )
break;