Skip to content

Commit 123cfe3

Browse files
FelixSchladtdanielinux
authored andcommitted
Correct the MSS option size check
1 parent 4fc5c7c commit 123cfe3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎modules/pico_tcp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ static inline void tcp_parse_option_mss(struct pico_socket_tcp *t, uint8_t len,
868868
if (tcpopt_len_check(idx, len, PICO_TCPOPTLEN_MSS) < 0)
869869
return;
870870

871-
if ((*idx + PICO_TCPOPTLEN_MSS) > len)
871+
if ((*idx + PICO_TCPOPTLEN_MSS - 2) > len)
872872
return;
873873

874874
t->mss_ok = 1;

0 commit comments

Comments
 (0)