mirror of
				https://github.com/yuzu-emu/mbedtls.git
				synced 2025-11-04 09:15:05 +00:00 
			
		
		
		
	Removing 'if' branch from the fix.
This new error shouldn't be distinguishable from other padding errors. Updating 'bad' instead of adding a new 'if' branch.
This commit is contained in:
		
							parent
							
								
									e5b26c107b
								
							
						
					
					
						commit
						cbbfaba5a6
					
				| 
						 | 
					@ -848,8 +848,7 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
 | 
				
			||||||
        bad |= *p++; /* Must be zero */
 | 
					        bad |= *p++; /* Must be zero */
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( pad_count < 8 )
 | 
					    bad |= ( pad_count < 8 );
 | 
				
			||||||
        return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( bad )
 | 
					    if( bad )
 | 
				
			||||||
        return( MBEDTLS_ERR_RSA_INVALID_PADDING );
 | 
					        return( MBEDTLS_ERR_RSA_INVALID_PADDING );
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue