mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Check ssl->arrays in SendClientHello to avoid null dereference. Allow building with fallthrough defined.
This commit is contained in:
@ -22666,6 +22666,10 @@ exit_dpk:
|
|||||||
WOLFSSL_START(WC_FUNC_CLIENT_HELLO_SEND);
|
WOLFSSL_START(WC_FUNC_CLIENT_HELLO_SEND);
|
||||||
WOLFSSL_ENTER("SendClientHello");
|
WOLFSSL_ENTER("SendClientHello");
|
||||||
|
|
||||||
|
if (ssl == NULL || ssl->arrays == NULL) {
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
if (ssl->suites == NULL) {
|
if (ssl->suites == NULL) {
|
||||||
WOLFSSL_MSG("Bad suites pointer in SendClientHello");
|
WOLFSSL_MSG("Bad suites pointer in SendClientHello");
|
||||||
return SUITES_ERROR;
|
return SUITES_ERROR;
|
||||||
|
@ -315,7 +315,8 @@ decouple library dependencies with standard string, memory and so on.
|
|||||||
#if defined(WOLFSSL_LINUXKM) && defined(fallthrough)
|
#if defined(WOLFSSL_LINUXKM) && defined(fallthrough)
|
||||||
#define FALL_THROUGH fallthrough
|
#define FALL_THROUGH fallthrough
|
||||||
#else
|
#else
|
||||||
#define FALL_THROUGH ; __attribute__ ((fallthrough))
|
/* Use __ notation to avoid conflicts */
|
||||||
|
#define FALL_THROUGH ; __attribute__ ((__fallthrough__))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user