mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
Fix other occurrences of same bounds check issue
Security impact is the same: not triggerrable remotely except in very specific use cases
This commit is contained in:
parent
22c3b7b9da
commit
4dc9b394d3
2 changed files with 5 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ static int pk_write_ec_pubkey( unsigned char **p, unsigned char *start,
|
|||
return( ret );
|
||||
}
|
||||
|
||||
if( *p - start < (int) len )
|
||||
if( *p < start || (size_t)( *p - start ) < len )
|
||||
return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
|
||||
|
||||
*p -= len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue