Skip to content

Commit 108afdf

Browse files
committed
F-5633: use explicit NULL comparison in FreeCiphers
Use the project's preferred `ptr != NULL` form for the new DTLS 1.3 ChaCha record-number zeroization guards instead of relying on truthiness.
1 parent 5e76c66 commit 108afdf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/internal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3343,9 +3343,9 @@ void FreeCiphers(WOLFSSL* ssl)
33433343
ssl->dtlsRecordNumberDecrypt.aes = NULL;
33443344
#endif /* BUILD_AES */
33453345
#ifdef HAVE_CHACHA
3346-
if (ssl->dtlsRecordNumberEncrypt.chacha)
3346+
if (ssl->dtlsRecordNumberEncrypt.chacha != NULL)
33473347
ForceZero(ssl->dtlsRecordNumberEncrypt.chacha, sizeof(ChaCha));
3348-
if (ssl->dtlsRecordNumberDecrypt.chacha)
3348+
if (ssl->dtlsRecordNumberDecrypt.chacha != NULL)
33493349
ForceZero(ssl->dtlsRecordNumberDecrypt.chacha, sizeof(ChaCha));
33503350
XFREE(ssl->dtlsRecordNumberEncrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);
33513351
XFREE(ssl->dtlsRecordNumberDecrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);

0 commit comments

Comments
 (0)