forked from wolfSSL/wolfssl
Merge pull request #891 from JacobBarthelmeh/Testing
sanity check on input buffer index
This commit is contained in:
@@ -10633,7 +10633,13 @@ int ProcessReply(WOLFSSL* ssl)
|
|||||||
|
|
||||||
if (IsEncryptionOn(ssl, 0)) {
|
if (IsEncryptionOn(ssl, 0)) {
|
||||||
WOLFSSL_MSG("Bundled encrypted messages, remove middle pad");
|
WOLFSSL_MSG("Bundled encrypted messages, remove middle pad");
|
||||||
ssl->buffers.inputBuffer.idx -= ssl->keys.padSz;
|
if (ssl->buffers.inputBuffer.idx >= ssl->keys.padSz) {
|
||||||
|
ssl->buffers.inputBuffer.idx -= ssl->keys.padSz;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
WOLFSSL_MSG("\tmiddle padding error");
|
||||||
|
return FATAL_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user