mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
Replace strcpy with memmove for overlapping regions
This commit is contained in:
1 parent
cb6a4166b7
commit
6387bed4f2
2 files changed
+3
-3
No files matched your search
@@ -121,7 +121,7 @@ int ftpsyst(struct clientparam *param, unsigned char *buf, unsigned len){
|
||||
buf[3] = 0;
|
||||
if(atoi((char *)buf)/100 != 2) return 723;
|
||||
buf[i-2] = 0;
|
||||
strcpy((char *)buf, (char *)buf+4);
|
||||
memmove((char *)buf, (char *)buf+4, strlen((char *)buf+4)+1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ int ftppwd(struct clientparam *param, unsigned char *buf, unsigned len){
|
||||
b++;
|
||||
*e = 0;
|
||||
}
|
||||
strcpy((char *)buf, b);
|
||||
memmove((char *)buf, b, strlen(b)+1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user