Преглед изворни кода

qcacld-3.0: Modify type of variable used to store FILS Wrapped Data

Currently lim_create_fils_auth_data calls lim_create_fils_wrapper_data
to calculate length of the created wrapped data and stores it in an
unsigned variable wrapped_data_len. But return type of
lim_create_fils_wrapper_data is int so it could return negative value.
Less-than-zero comparison present in lim_create_fils_auth_data of an
unsigned value is never true, as unsigned value can never be less than 0.
Results lim_create_fils_auth_data returns improper 'fils auth data' which
used to be send in auth req.

To make 'less-than-zero comparison' effective in lim_create_fils_auth_data
change type of wrapped_data_len from unsigned int to signed int.

Change-Id: I66d872b76b2039179e3f3dd0ccbb6c135174e354
CRs-Fixed: 2233113
Abhinav Kumar пре 7 година
родитељ
комит
78404a87f0
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      core/mac/src/pe/lim/lim_process_fils.c

+ 1 - 1
core/mac/src/pe/lim/lim_process_fils.c

@@ -1212,7 +1212,7 @@ uint32_t lim_create_fils_auth_data(tpAniSirGlobal mac_ctx,
 		tpPESession session)
 {
 	uint32_t frame_len = 0;
-	uint32_t wrapped_data_len;
+	int32_t wrapped_data_len;
 
 	if (!session->fils_info)
 		return 0;