forked from wolfSSL/wolfssl
DTLS Multicast
wolfSSL_set_secret() was checking the preMasterSz against the sizeof the preMasterSecret member of the Arrays structure. That member was changed to a pointer and allocated dynamically for the session write-duping. The comparison between the passed in size and the size of the parameter started failing. The check now uses the constant that is used for allocating the preMasterSecret member.
This commit is contained in:
@ -902,8 +902,8 @@ int wolfSSL_set_secret(WOLFSSL* ssl, word16 epoch,
|
||||
|
||||
WOLFSSL_ENTER("wolfSSL_set_secret()");
|
||||
|
||||
if (ssl == NULL || preMasterSecret == NULL || preMasterSz == 0 ||
|
||||
preMasterSz > sizeof(ssl->arrays->preMasterSecret) ||
|
||||
if (ssl == NULL || preMasterSecret == NULL ||
|
||||
preMasterSz == 0 || preMasterSz > ENCRYPT_LEN ||
|
||||
clientRandom == NULL || serverRandom == NULL || suite == NULL) {
|
||||
|
||||
ret = BAD_FUNC_ARG;
|
||||
|
Reference in New Issue
Block a user