Skip to content

Commit 77c7418

Browse files
authored
Merge pull request #9973 from JacobBarthelmeh/static_analysis
fix to sanity check on importing raw session key info
2 parents 87906a3 + d36f7a2 commit 77c7418

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ static int ImportKeyState(WOLFSSL* ssl, const byte* exp, word32 len, byte ver,
11691169
XMEMCPY(keys->server_write_MAC_secret, exp + idx, sz); idx += sz;
11701170
}
11711171
#else
1172-
if (sz + idx > len) {
1172+
if ((sz * 2) + idx > len) {
11731173
return BUFFER_E;
11741174
}
11751175
idx += sz; idx += sz;

0 commit comments

Comments
 (0)