Merge pull request #891 from JacobBarthelmeh/Testing

sanity check on input buffer index
This commit is contained in:
toddouska
2017-05-03 12:13:43 -07:00
committed by GitHub

View File

@@ -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;