diff --git a/net/devif/devif_iobsend.c b/net/devif/devif_iobsend.c index d83bd292db..496bb1df8f 100644 --- a/net/devif/devif_iobsend.c +++ b/net/devif/devif_iobsend.c @@ -55,7 +55,12 @@ void devif_iob_send(FAR struct net_driver_s *dev, FAR struct iob_s *iob, unsigned int len, unsigned int offset) { - DEBUGASSERT(dev && len > 0 && len < NETDEV_PKTSIZE(dev)); + if (dev == NULL || len == 0 || len >= NETDEV_PKTSIZE(dev)) + { + nerr("devif_iob_send error, %p, send len: %u, pkt len: %u\n", + dev, len, NETDEV_PKTSIZE(dev)); + return; + } /* Copy the data from the I/O buffer chain to the device buffer */