cfg80211-wext: return -E2BIG when buffer can't hold full BSS entry
When using the wext compatibility code in cfg80211, part of the IEs can be truncated if the passed user buffer is large enough for part of the BSS but not large enough for all of the IEs. This can cause an EAP network to show up as a PSK network. Always return -E2BIG in this case to avoid truncating data. Since this changes the control flow, use an on-stack variable for a small buffer instead of allocating it. Signed-off-by: NJames Minor <james.minor@ni.com> [rework patch to error out immediately, use _check wrappers] Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Showing
想要评论请 注册 或 登录