Fix uninitialized variable in an edge case
If `context_buf = mbedtls_calloc( 1, buf_len )` failed, `context_buf_len` was not initialized. Noticed by `gcc -Os -Werror=maybe-uninitialized`. This was only a problem in ssl_server2 (a test program), only with MBEDTLS_SSL_CONTEXT_SERIALIZATION enabled.
This commit is contained in:
parent
2fdb1af18c
commit
4e8b594002
1 changed files with 1 additions and 1 deletions
|
@ -1820,7 +1820,7 @@ int main( int argc, char *argv[] )
|
|||
#endif
|
||||
#if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION)
|
||||
unsigned char *context_buf = NULL;
|
||||
size_t context_buf_len;
|
||||
size_t context_buf_len = 0;
|
||||
#endif
|
||||
|
||||
int i;
|
||||
|
|
Loading…
Reference in a new issue