1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

avoid "maybe-uninitialized" and "free-nonheap-object" errors/warnings with gcc11

Signed-off-by: Shawn Carey <shawn.carey@netfoundry.io>
This commit is contained in:
Shawn Carey
2021-05-06 15:11:30 -04:00
parent 2213871654
commit aa13e93941
4 changed files with 7 additions and 7 deletions

View File

@ -651,7 +651,7 @@ static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s,
unsigned char *sig, size_t *slen )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
unsigned char buf[MBEDTLS_ECDSA_MAX_LEN];
unsigned char buf[MBEDTLS_ECDSA_MAX_LEN] = {0};
unsigned char *p = buf + sizeof( buf );
size_t len = 0;