[PATCH 4/4] nl80211: fix of sizeof in vendor event handling

Ilan Peer ilan.peer
Wed Jan 22 06:05:47 PST 2014


From: Max Stepanov <Max.Stepanov at intel.com>

Fixing sizeof in a validity comparison of nl80211_vendor_cmd_info size.

Signed-hostap: Max Stepanov <Max.Stepanov at intel.com>
---
 src/drivers/driver_nl80211.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0b8eed5..e648486 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3584,7 +3584,7 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
 
 		nla_for_each_nested(nl, tb[NL80211_ATTR_VENDOR_DATA], rem) {
 			struct nl80211_vendor_cmd_info *vinfo;
-			if (nla_len(nl) != sizeof(vinfo)) {
+			if (nla_len(nl) != sizeof(*vinfo)) {
 				wpa_printf(MSG_DEBUG, "nl80211: Unexpected vendor data info");
 				continue;
 			}
@@ -3600,7 +3600,7 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
 
 		nla_for_each_nested(nl, tb[NL80211_ATTR_VENDOR_EVENTS], rem) {
 			struct nl80211_vendor_cmd_info *vinfo;
-			if (nla_len(nl) != sizeof(vinfo)) {
+			if (nla_len(nl) != sizeof(*vinfo)) {
 				wpa_printf(MSG_DEBUG, "nl80211: Unexpected vendor data info");
 				continue;
 			}
-- 
1.7.10.4




More information about the Hostap mailing list