hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()
authorMauro Matteo Cascella <mcascell@redhat.com>
Fri, 10 Jul 2020 09:19:41 +0000 (11:19 +0200)
committerJason Wang <jasowang@redhat.com>
Tue, 21 Jul 2020 13:30:39 +0000 (21:30 +0800)
commit5519724a13664b43e225ca05351c60b4468e4555
tree401da5be376e55b6477d4bc67eabe244443b28dd
parente219d30910d8584868dd5c11df10ba2a1336034c
hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()

A buffer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It
occurs while sending an Ethernet frame due to missing break statements
and improper checking of the buffer size.

Reported-by: Ziming Zhang <ezrakiez@gmail.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/xgmac.c