Skip to content

Commit 0668c6e

Browse files
authored
Merge pull request #8039 from douzzer/20241002-fix-for-cppcheck-force-source
20241002-fix-for-cppcheck-force-source
2 parents e814d1b + b81cc50 commit 0668c6e

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

src/internal.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21730,16 +21730,19 @@ int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
2173021730
else
2173121731
#endif
2173221732
{
21733-
#ifdef HAVE_ENCRYPT_THEN_MAC
21734-
word16 startedETMRead = ssl->options.startedETMRead;
21735-
#else
21736-
word16 startedETMRead = 0;
21737-
#endif
2173821733
/* With atomicUser the callback should have already included
2173921734
* the mac in the padding size. The ETM callback doesn't do
2174021735
* this for some reason. */
21741-
if (ssl->specs.cipher_type != aead &&
21742-
(!atomicUser || startedETMRead)) {
21736+
if (ssl->specs.cipher_type != aead
21737+
#ifdef ATOMIC_USER
21738+
&& (!atomicUser
21739+
#ifdef HAVE_ENCRYPT_THEN_MAC
21740+
|| ssl->options.startedETMRead
21741+
#endif /* HAVE_ENCRYPT_THEN_MAC */
21742+
)
21743+
#endif /* !ATOMIC_USER */
21744+
)
21745+
{
2174321746
/* consider MAC as padding */
2174421747
ssl->keys.padSz += MacSize(ssl);
2174521748
}

0 commit comments

Comments
 (0)