diff options
| author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2024-04-28 20:11:23 +0900 |
|---|---|---|
| committer | Jason Wang <jasowang@redhat.com> | 2025-03-10 17:07:16 +0800 |
| commit | 2938c36937559554a2408b008470c9a76cb9271a (patch) | |
| tree | e926f1706ecf559a72bab6ea4f1ac113f9f72a2b /hw/net/net_tx_pkt.c | |
| parent | 9dc64bd5a4bebdc820e7e8484cb30e02befdc774 (diff) | |
| download | focaccia-qemu-2938c36937559554a2408b008470c9a76cb9271a.tar.gz focaccia-qemu-2938c36937559554a2408b008470c9a76cb9271a.zip | |
Revert "hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()"
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>
Diffstat (limited to 'hw/net/net_tx_pkt.c')
| -rw-r--r-- | hw/net/net_tx_pkt.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c index 1f79b82b77..903238dca2 100644 --- a/hw/net/net_tx_pkt.c +++ b/hw/net/net_tx_pkt.c @@ -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; } |