lowpan6: Fix incorrect array bounds check (found by Coverity)

This commit is contained in:
Dirk Ziegelmeier 2016-03-02 19:45:15 +01:00
parent 9885d5d9f5
commit cc4f94f415

View File

@ -564,7 +564,7 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr
err_t
lowpan6_set_context(u8_t idx, const ip6_addr_t * context)
{
if (idx > LWIP_6LOWPAN_NUM_CONTEXTS) {
if (idx >= LWIP_6LOWPAN_NUM_CONTEXTS) {
return ERR_ARG;
}