forked from wolfSSL/wolfssl
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_ENTER("SendClientHello");
|
||||
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (ssl->suites == NULL) {
|
||||
WOLFSSL_MSG("Bad suites pointer in SendClientHello");
|
||||
return SUITES_ERROR;
|
||||
|
@ -315,7 +315,8 @@ decouple library dependencies with standard string, memory and so on.
|
||||
#if defined(WOLFSSL_LINUXKM) && defined(fallthrough)
|
||||
#define FALL_THROUGH fallthrough
|
||||
#else
|
||||
#define FALL_THROUGH ; __attribute__ ((fallthrough))
|
||||
/* Use __ notation to avoid conflicts */
|
||||
#define FALL_THROUGH ; __attribute__ ((__fallthrough__))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user