mirror of https://github.com/mirror/busybox.git
parent
104d544fd7
commit
0a0180cdc5
|
@ -623,9 +623,7 @@ int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||||
char *local_file, *mode;
|
char *local_file, *mode;
|
||||||
const char *error_msg;
|
const char *error_msg;
|
||||||
int opt, result, opcode;
|
int opt, result, opcode;
|
||||||
int local_fd = local_fd; /* for compiler */
|
int blksize = TFTP_BLKSIZE_DEFAULT;
|
||||||
int blksize = blksize;
|
|
||||||
USE_GETPUT(int cmd = cmd;)
|
|
||||||
|
|
||||||
INIT_G();
|
INIT_G();
|
||||||
|
|
||||||
|
@ -658,14 +656,13 @@ int tftpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||||
}
|
}
|
||||||
local_file = block_buf + 2;
|
local_file = block_buf + 2;
|
||||||
if (local_file[0] == '.' || strstr(local_file, "/.")) {
|
if (local_file[0] == '.' || strstr(local_file, "/.")) {
|
||||||
error_msg = "dot in local_file";
|
error_msg = "dot in file name";
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
mode = local_file + strlen(local_file) + 1;
|
mode = local_file + strlen(local_file) + 1;
|
||||||
if (mode >= block_buf + result || strcmp(mode, "octet") != 0) {
|
if (mode >= block_buf + result || strcmp(mode, "octet") != 0) {
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
blksize = TFTP_BLKSIZE_DEFAULT;
|
|
||||||
#if ENABLE_FEATURE_TFTP_BLOCKSIZE
|
#if ENABLE_FEATURE_TFTP_BLOCKSIZE
|
||||||
{
|
{
|
||||||
char *res;
|
char *res;
|
||||||
|
|
Loading…
Reference in New Issue