master/device.c
changeset 1521 2180c608e250
parent 1507 68e89abadd19
child 1554 e07a0f8de03d
--- a/master/device.c	Thu Aug 06 12:52:53 2009 +0000
+++ b/master/device.c	Tue Aug 11 12:15:20 2009 +0000
@@ -506,6 +506,12 @@
 {
     const void *ec_data = data + ETH_HLEN;
     size_t ec_size = size - ETH_HLEN;
+
+    if (unlikely(!data)) {
+        EC_WARN("%s() called with NULL data.\n", __func__);
+        return;
+    }
+
     device->rx_count++;
 
     if (unlikely(device->master->debug_level > 1)) {