mirror of https://github.com/wolfSSL/wolfssh.git
sanity check on auth name size
parent
c01edacd09
commit
6c86ccabc1
|
@ -3763,6 +3763,12 @@ static int DoUserAuthRequest(WOLFSSH* ssh,
|
|||
ret = GetUint32(&authData.authNameSz, buf, len, &begin);
|
||||
}
|
||||
|
||||
if (ret == WS_SUCCESS) {
|
||||
if (authData.authNameSz > len - begin) {
|
||||
ret = WS_BUFFER_E;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == WS_SUCCESS) {
|
||||
authData.authName = buf + begin;
|
||||
begin += authData.authNameSz;
|
||||
|
|
Loading…
Reference in New Issue