forked from wolfSSL/wolfssl
Better fix for scan-build warning regarding possible use of NULL in AddRecordHeader. Scan-build considers paths where output is set to NULL, but ssl->spec.kea is corrupted/changed, which could result in output == NULL (even though it should never happen). So added proper NULL check in SendServerKeyExchange on AddHeader to make sure output isn't NULL.
This commit is contained in:
@ -15468,9 +15468,16 @@ int DoSessionTicket(WOLFSSL* ssl,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_ECC)
|
#if defined(HAVE_ECC)
|
||||||
if (ssl->specs.kea == ecdhe_psk_kea || ssl->specs.kea == ecc_diffie_hellman_kea) {
|
if (ssl->specs.kea == ecdhe_psk_kea ||
|
||||||
|
ssl->specs.kea == ecc_diffie_hellman_kea) {
|
||||||
|
/* Check output to make sure it was set */
|
||||||
|
if (output) {
|
||||||
AddHeaders(output, length, server_key_exchange, ssl);
|
AddHeaders(output, length, server_key_exchange, ssl);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
ERROR_OUT(BUFFER_ERROR, exit_sske);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif /* HAVE_ECC */
|
#endif /* HAVE_ECC */
|
||||||
|
|
||||||
#ifdef WOLFSSL_DTLS
|
#ifdef WOLFSSL_DTLS
|
||||||
|
Reference in New Issue
Block a user