mirror of https://github.com/wolfSSL/wolfssh.git
Merge pull request #90 from JacobBarthelmeh/fuzz
fix for possible overflow with sanity checkpull/91/head
commit
1a0be6492f
|
@ -2204,7 +2204,7 @@ static int DoKexDhReply(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
|
|||
begin = *idx;
|
||||
pubKey = buf + begin;
|
||||
ret = GetUint32(&pubKeySz, buf, len, &begin);
|
||||
if (ret == WS_SUCCESS && (pubKeySz + LENGTH_SZ + begin > len)) {
|
||||
if (ret == WS_SUCCESS && (pubKeySz > len - LENGTH_SZ - begin )) {
|
||||
ret = WS_BUFFER_E;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue