mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-02-20 12:21:40 +01:00
Fix off-by-one in username length check
This commit is contained in:
parent
6cd50869c2
commit
73c3bda8cd
@ -1794,7 +1794,7 @@ ws_ctx_t *do_handshake(int sock, char * const ip) {
|
|||||||
if (resppw && *resppw)
|
if (resppw && *resppw)
|
||||||
resppw++;
|
resppw++;
|
||||||
if (settings.passwdfile) {
|
if (settings.passwdfile) {
|
||||||
if (resppw && *resppw && resppw - response < 32) {
|
if (resppw && *resppw && resppw - response < USERNAME_LEN + 1) {
|
||||||
char pwbuf[4096];
|
char pwbuf[4096];
|
||||||
struct kasmpasswd_t *set = readkasmpasswd(settings.passwdfile);
|
struct kasmpasswd_t *set = readkasmpasswd(settings.passwdfile);
|
||||||
if (!set->num) {
|
if (!set->num) {
|
||||||
|
Loading…
Reference in New Issue
Block a user