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.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Jouni Malinen
2011-08-11 11:46:22 +03:00
committed by John W. Linville
parent 040bdf713d
commit f612cedfe1
3 changed files with 7 additions and 0 deletions

View File

@ -563,6 +563,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.
*/
};
/**