fix potential buffer overflow in config file parsing

could be triggered by using username or password exceeding 255
bytes for http type proxies.

closes #606
This commit is contained in:
rofl0r
2025-10-18 12:13:11 +00:00
parent ce07eaa191
commit cc005b7132

View File

@@ -241,7 +241,7 @@ static int proxy_from_string(const char *proxystring,
ul = p-u;
p++;
pl = at-p;
if(proxytype == RS_PT_SOCKS5 && (ul > 255 || pl > 255))
if(ul > 255 || pl > 255)
return 0;
memcpy(user_buf, u, ul);
user_buf[ul]=0;