Commit 76a70e9c authored by James Minor's avatar James Minor Committed by Johannes Berg

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: default avatarJames Minor <james.minor@ni.com>
[rework patch to error out immediately, use _check wrappers]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 36ef906e
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment