瀏覽代碼

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 {