From 7c5f67a3799abd6feb5e60bc90fb43504ea71e1b Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Mon, 11 Sep 2023 08:21:37 +0200 Subject: [PATCH] Fixed TCP regression (issue #19) --- modules/pico_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/pico_tcp.c b/modules/pico_tcp.c index 423d6966..f24ee3db 100644 --- a/modules/pico_tcp.c +++ b/modules/pico_tcp.c @@ -900,7 +900,7 @@ static int tcp_parse_options(struct pico_frame *f) uint32_t i = 0; f->timestamp = 0; - if (f->buffer + f->buffer_len > f->transport_hdr + f->transport_len) + if (f->transport_hdr + f->transport_len > f->buffer + f->buffer_len) return -1; while (i < (f->transport_len - PICO_SIZE_TCPHDR)) {