mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-27 07:59:41 +08:00
Fix: null pointer dereference in ftppr / smtpp
This commit is contained in:
1 parent
f265ea0b52
commit
2b8845f65a
3 files changed
+42
-10
No files matched your search
@@ -64,6 +64,13 @@ void * ftpprchild(struct clientparam* param) {
|
||||
|
||||
}
|
||||
else if (!strncasecmp((char *)buf, "PASS ", 5)){
|
||||
/* The user name carries the server to log in to, and it arrives
|
||||
with USER. Without it there is nothing to log in to, and what
|
||||
follows would read the name and the host as if there were. */
|
||||
if(!param->hostname || !param->extusername){
|
||||
socksend(param, param->ctrlsock, (unsigned char *)"503 Login with USER first\r\n", 27, conf.timeouts[STRING_S]);
|
||||
RETURN(805);
|
||||
}
|
||||
param->extpassword = (unsigned char *)strdup((char *)buf+5);
|
||||
inbuf = BUFSIZE;
|
||||
res = ftplogin(param, (char *)buf, &inbuf);
|
||||
|
||||
Reference in new issue
Block a user