Skip to content

Commit 0ba406a

Browse files
Fix for CID 299536 possible null dereference
1 parent a2032df commit 0ba406a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/ssl.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29974,12 +29974,16 @@ static void SESSION_ex_data_cache_update(WOLFSSL_SESSION* session, int idx,
2997429974
#endif
2997529975
) {
2997629976
if (get) {
29977-
*getRet = wolfSSL_CRYPTO_get_ex_data(
29977+
if (getRet) {
29978+
*getRet = wolfSSL_CRYPTO_get_ex_data(
2997829979
&cacheSession->ex_data, idx);
29980+
}
2997929981
}
2998029982
else {
29981-
*setRet = wolfSSL_CRYPTO_set_ex_data(
29983+
if (setRet) {
29984+
*setRet = wolfSSL_CRYPTO_set_ex_data(
2998229985
&cacheSession->ex_data, idx, data);
29986+
}
2998329987
}
2998429988
foundCache = 1;
2998529989
break;

0 commit comments

Comments
 (0)