correct parameter check when retrieving the current channel list

MFC after:	3 days
This commit is contained in:
Sam Leffler 2005-12-12 17:38:53 +00:00
parent 5804e5be7f
commit e55e5e4276

View File

@ -884,7 +884,7 @@ static int
ieee80211_ioctl_getchanlist(struct ieee80211com *ic, struct ieee80211req *ireq)
{
if (sizeof(ic->ic_chan_active) > ireq->i_len)
if (sizeof(ic->ic_chan_active) < ireq->i_len)
ireq->i_len = sizeof(ic->ic_chan_active);
return copyout(&ic->ic_chan_active, ireq->i_data, ireq->i_len);
}