NULL pointer defref check in ethernet gadget driver (#84)

This commit is contained in:
pencilpusher
2025-04-02 21:05:43 -05:00
committed by GitHub
parent b72c1b0eb3
commit 01cfcca02f

View File

@@ -794,7 +794,7 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
}
/* apply outgoing CDC or RNDIS filters */
if (!test_bit(RMNET_MODE_LLP_IP, &dev->flags) &&
if (skb && !test_bit(RMNET_MODE_LLP_IP, &dev->flags) &&
!is_promisc(cdc_filter)) {
u8 *dest = skb->data;