From 78404a87f04c7d5096fd552cff655b083318ba0e Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Wed, 2 May 2018 11:44:17 +0530 Subject: [PATCH] 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 --- core/mac/src/pe/lim/lim_process_fils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_process_fils.c b/core/mac/src/pe/lim/lim_process_fils.c index 165a64561275..2d09551072d1 100644 --- a/core/mac/src/pe/lim/lim_process_fils.c +++ b/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;