Add a comment regarding remaining space check

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2020-07-17 05:49:47 -04:00
parent c3b69edd2f
commit 3403969645
No known key found for this signature in database
GPG Key ID: 89A90840DC388527

View File

@ -659,6 +659,7 @@ static int asn1_write_mpibuf( unsigned char **p, unsigned char *start,
len += 1;
}
/* Ensure that there is still space for len and ASN1_INTEGER */
if( ( *p - start ) < 2 )
return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );