]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Revert "hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()"
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sun, 28 Apr 2024 11:11:23 +0000 (20:11 +0900)
committerJason Wang <jasowang@redhat.com>
Mon, 10 Mar 2025 09:07:16 +0000 (17:07 +0800)
This reverts commit 83ddb3dbba2ee0f1767442ae6ee665058aeb1093.

The added check is no longer necessary due to a change of
iov_from_buf().

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/net_tx_pkt.c

index 1f79b82b77f46fa807cb280f03db760dcacbc892..903238dca24d04cb39ec791fb64beb58540d2e4c 100644 (file)
@@ -141,10 +141,6 @@ bool net_tx_pkt_update_sctp_checksum(struct NetTxPkt *pkt)
     uint32_t csum = 0;
     struct iovec *pl_start_frag = pkt->vec + NET_TX_PKT_PL_START_FRAG;
 
-    if (iov_size(pl_start_frag, pkt->payload_frags) < 8 + sizeof(csum)) {
-        return false;
-    }
-
     if (iov_from_buf(pl_start_frag, pkt->payload_frags, 8, &csum, sizeof(csum)) < sizeof(csum)) {
         return false;
     }