On Thu, Jun 13, 2019 at 11:38 AM Brian Norris <briannorris@xxxxxxxxxxxx> wrote: > So, I might say: > > /* Vendor IEs must at least contain the OUI. */ > if (total_ie_len < offsetof(struct ieee80211_vendor_ie, oui_type)) > return -EINVAL; > > /* If the IE still isn't long enough, it's not a match. */ > if (element_len < sizeof(wpa_oui)) > continue; That would of course need to be break, not continue, to properly skip to the next IE. Brian