mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55:40 +08:00
Don't pad the text address with the binary form
The buf gets copied to hostname and is present verbatim in logs looking like pure random garbage. Moreover you can't really strlen() it. This was likely some silly typo in inet_ntoa -> inet_ntop conversion for ipv6, since it used to be correct before.
This commit is contained in:
parent
1f5198a238
commit
ce6c2a069c
@ -100,7 +100,7 @@ void * sockschild(struct clientparam* param) {
|
|||||||
if(command==1 && !param->req.sin_addr.s_addr) {
|
if(command==1 && !param->req.sin_addr.s_addr) {
|
||||||
RETURN(421);
|
RETURN(421);
|
||||||
}
|
}
|
||||||
myinet_ntop(*SAFAMILY(¶m->sins), SAADDR(¶m->sins), (char *)buf + strlen((char *)buf), 64);
|
myinet_ntop(*SAFAMILY(¶m->sins), SAADDR(¶m->sins), (char *)buf, 64);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if ((size = sockgetcharcli(param, conf.timeouts[SINGLEBYTE_S], 0)) == EOF) {RETURN(451);} /* nmethods */
|
if ((size = sockgetcharcli(param, conf.timeouts[SINGLEBYTE_S], 0)) == EOF) {RETURN(451);} /* nmethods */
|
||||||
|
Loading…
Reference in New Issue
Block a user