From 433721b4cc57e3a6a34a9b013b1a4aac5a9e644f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 11 Aug 2011 11:46:22 +0300 Subject: nl80211/cfg80211: Make addition of new sinfo fields safer Add a comment pointing out the use of enum station_info_flags for all new struct station_info fields. In addition, memset the sinfo buffer to zero before use on all paths in the current tree to avoid leaving uninitialized pointers in the data. (cherry picked from commit 87159de9c30dab02b84cbaffa7498140d4ebc1a1 from android.googlesource.com/common.git) Signed-off-by: Jouni Malinen Signed-off-by: John W. Linville Signed-off-by: Dmitry Shmidt Signed-off-by: Varun Wadekar Change-Id: I24301d45108587e66c8421a7f2a94ea98300ebeb Reviewed-on: http://git-master/r/78887 Reviewed-by: Automatic_Commit_Validation_User --- include/net/cfg80211.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/net') diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index fe7627847a72..ffa8aedd70f0 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -566,6 +566,11 @@ struct station_info { const u8 *assoc_req_ies; size_t assoc_req_ies_len; + + /* + * Note: Add a new enum station_info_flags value for each new field and + * use it to check which fields are initialized. + */ }; /** -- cgit v1.2.3