mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
leon,grspw_pkt: protect TX descriptor from bad input (hdrlen)
This commit is contained in:
1 parent
ddc95ab04b
commit
0aae151eba
1 file changed
+2
-1
@@ -1470,7 +1470,8 @@ STATIC int grspw_tx_schedule_send(struct grspw_dma_priv *dma)
|
||||
curr_pkt->flags &= ~PKT_FLAG_TR_HDR;
|
||||
}
|
||||
BD_WRITE(&curr_bd->bd->haddr, hwaddr);
|
||||
ctrl = GRSPW_TXBD_EN | curr_pkt->hlen;
|
||||
ctrl = GRSPW_TXBD_EN |
|
||||
(curr_pkt->hlen & GRSPW_TXBD_HLEN);
|
||||
} else {
|
||||
ctrl = GRSPW_TXBD_EN;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user