potential bug in bnep_net_set_mc_list()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dan Carpenter
Date: Friday, June 18, 2010 - 4:09 pm

This is from ff6e2163f28a: "net: convert multiple drivers to use
netdev_for_each_mc_addr, part7"

net/bluetooth/bnep/netdev.c
   101                  i = 0;
   102                  netdev_for_each_mc_addr(ha, dev) {
   103                          if (i == BNEP_MAX_MULTICAST_FILTERS)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   104                                  break;
   105                          memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
   106                          memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
   107                  }

"i" is never incremented here so the check is always false.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
potential bug in bnep_net_set_mc_list(), Dan Carpenter, (Fri Jun 18, 4:09 pm)
Re: potential bug in bnep_net_set_mc_list(), Gustavo F. Padovan, (Fri Jun 18, 5:22 pm)
[PATCH] Bluetooth: Bring back var 'i' increment, Gustavo F. Padovan, (Fri Jun 18, 5:24 pm)
Re: [PATCH] Bluetooth: Bring back var 'i' increment, Gustavo F. Padovan, (Fri Jun 18, 5:28 pm)
Re: [PATCH] Bluetooth: Bring back var 'i' increment, David Miller, (Thu Jun 24, 10:08 pm)