mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	- Fixed mpi_fill_random() to fill and create right size MPI
This commit is contained in:
		
							parent
							
								
									b08e6843c2
								
							
						
					
					
						commit
						39dfdaca8f
					
				@ -1618,10 +1618,10 @@ int mpi_fill_random( mpi *X, size_t size,
 | 
			
		||||
{
 | 
			
		||||
    int ret;
 | 
			
		||||
 | 
			
		||||
    MPI_CHK( mpi_grow( X, size ) );
 | 
			
		||||
    MPI_CHK( mpi_grow( X, CHARS_TO_LIMBS( size ) ) );
 | 
			
		||||
    MPI_CHK( mpi_lset( X, 0 ) );
 | 
			
		||||
 | 
			
		||||
    MPI_CHK( f_rng( p_rng, (unsigned char *) X->p, X->n * ciL ) );
 | 
			
		||||
    MPI_CHK( f_rng( p_rng, (unsigned char *) X->p, size ) );
 | 
			
		||||
 | 
			
		||||
cleanup:
 | 
			
		||||
    return( ret );
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user