mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	- Inceased maximum size of ASN1 length reads to 32-bits
This commit is contained in:
		
							parent
							
								
									b892b1326c
								
							
						
					
					
						commit
						c4909d95f1
					
				@ -13,6 +13,7 @@ Changes
 | 
			
		||||
   * Documentation for AES and Camellia in modes CTR and CFB128 clarified.
 | 
			
		||||
   * Fixed rsa_encrypt and rsa_decrypt examples to use public key for
 | 
			
		||||
     encryption and private key for decryption. (Closes ticket #34)
 | 
			
		||||
   * Inceased maximum size of ASN1 length reads to 32-bits.
 | 
			
		||||
 | 
			
		||||
Bugfix
 | 
			
		||||
   * Fixed faulty HMAC-MD2 implementation. Found by dibac. (Closes
 | 
			
		||||
 | 
			
		||||
@ -89,6 +89,22 @@ static int asn1_get_len( unsigned char **p,
 | 
			
		||||
            (*p) += 3;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 3:
 | 
			
		||||
            if( ( end - *p ) < 4 )
 | 
			
		||||
                return( POLARSSL_ERR_ASN1_OUT_OF_DATA );
 | 
			
		||||
 | 
			
		||||
            *len = ( (*p)[1] << 16 ) | ( (*p)[2] << 8 ) | (*p)[3];
 | 
			
		||||
            (*p) += 4;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 4:
 | 
			
		||||
            if( ( end - *p ) < 5 )
 | 
			
		||||
                return( POLARSSL_ERR_ASN1_OUT_OF_DATA );
 | 
			
		||||
 | 
			
		||||
            *len = ( (*p)[1] << 24 ) | ( (*p)[2] << 16 ) | ( (*p)[3] << 8 ) | (*p)[4];
 | 
			
		||||
            (*p) += 5;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            return( POLARSSL_ERR_ASN1_INVALID_LENGTH );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user