Skip to content

Commit

Permalink
net: tcp2: Fix dereference after null check in tcp_in()
Browse files Browse the repository at this point in the history
Fix dereference after null check in tcp_in().

Coverity CID :210051

Fixes zephyrproject-rtos#25783

Signed-off-by: Oleg Zhurakivskyy <[email protected]>
  • Loading branch information
ozhuraki authored and carlescufi committed Jul 10, 2020
1 parent e520f35 commit fda94f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/net/ip/tcp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ static void tcp_in(struct tcp *conn, struct net_pkt *pkt)
}
}

if (len) {
if (th && len) {
if (th_seq(th) == conn->ack) {
if (tcp_data_get(conn, pkt) < 0) {
break;
Expand Down

0 comments on commit fda94f7

Please sign in to comment.