Skip to content
Commit ff4dd73d authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length



Unfortunately, the nla policy was defined to have HWSIM_ATTR_RADIO_NAME
as an NLA_STRING, rather than NLA_NUL_STRING, so we can't use it as a
NUL-terminated string in the kernel.

Rather than break the API, kasprintf() the string to a new buffer to
guarantee NUL termination.

Reported-by: default avatarAndrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 09e0a2fe
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