Skip to content

Commit 2938c36

Browse files
akihikodakijasowang
authored andcommitted
Revert "hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()"
This reverts commit 83ddb3d. The added check is no longer necessary due to a change of iov_from_buf(). Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Akihiko Odaki <[email protected]> Signed-off-by: Jason Wang <[email protected]>
1 parent 9dc64bd commit 2938c36

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

hw/net/net_tx_pkt.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ bool net_tx_pkt_update_sctp_checksum(struct NetTxPkt *pkt)
141141
uint32_t csum = 0;
142142
struct iovec *pl_start_frag = pkt->vec + NET_TX_PKT_PL_START_FRAG;
143143

144-
if (iov_size(pl_start_frag, pkt->payload_frags) < 8 + sizeof(csum)) {
145-
return false;
146-
}
147-
148144
if (iov_from_buf(pl_start_frag, pkt->payload_frags, 8, &csum, sizeof(csum)) < sizeof(csum)) {
149145
return false;
150146
}

0 commit comments

Comments
 (0)