소스 검색

telnet: validate `ftp server_port` command arg

Sergey Alirzaev 4 년 전
부모
커밋
d4d5760024
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/cli/CLI_Commands.c

+ 1 - 1
modules/cli/CLI_Commands.c

@@ -3132,7 +3132,7 @@ static portBASE_TYPE prvTaskFTPCommand(cli_state_t *cli_state, int8_t *pcWriteBu
             ;
             u16_t server_port_old = sSettings.sFTPUpdate.server_port;
             int temp = atoi(str);
-            if (temp < 0 || temp > 65535) {
+            if (temp < 1 || temp > 65535) {
                 strcpy((char *)pcWriteBuffer, (const char *)pcInvalidCommand);
                 return pdFALSE;
             } else {