mirror of https://github.com/wolfSSL/wolfssh.git
Merge pull request #814 from sebastian-carpenter/GH-issue-813
rearranged evaluation of unsigned conditionpull/816/head
commit
1828eeaf8e
|
|
@ -3227,7 +3227,7 @@ int wolfSSH_SendPacket(WOLFSSH* ssh)
|
|||
return WS_SOCKET_ERROR_E;
|
||||
}
|
||||
|
||||
while (ssh->outputBuffer.length - ssh->outputBuffer.idx > 0) {
|
||||
while (ssh->outputBuffer.length > ssh->outputBuffer.idx) {
|
||||
int sent;
|
||||
|
||||
/* sanity check on amount requested to be sent */
|
||||
|
|
@ -3237,7 +3237,7 @@ int wolfSSH_SendPacket(WOLFSSH* ssh)
|
|||
return WS_BUFFER_E;
|
||||
}
|
||||
|
||||
sent = ssh->ctx->ioSendCb(ssh,
|
||||
sent = ssh->ctx->ioSendCb(ssh,
|
||||
ssh->outputBuffer.buffer + ssh->outputBuffer.idx,
|
||||
ssh->outputBuffer.length - ssh->outputBuffer.idx,
|
||||
ssh->ioWriteCtx);
|
||||
|
|
@ -10002,7 +10002,7 @@ int DoReceive(WOLFSSH* ssh)
|
|||
}
|
||||
|
||||
if (!aeadMode) {
|
||||
if (ssh->curSz + UINT32_SZ - peerBlockSz > 0) {
|
||||
if (ssh->curSz + UINT32_SZ > peerBlockSz) {
|
||||
ret = Decrypt(ssh,
|
||||
ssh->inputBuffer.buffer + ssh->inputBuffer.idx
|
||||
+ peerBlockSz,
|
||||
|
|
|
|||
Loading…
Reference in New Issue