Check for NULL pointer in ecdev_receive().

This commit is contained in:
Florian Pose 2009-08-11 12:15:20 +00:00
parent c2cf92f9ec
commit 4099c6905b
1 changed files with 6 additions and 0 deletions

View File

@ -506,6 +506,12 @@ void ecdev_receive(
{
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)) {