From 6d7cd0ac81d62d51dcb431cee6121f50060ffba5 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Thu, 3 Jun 2021 10:37:15 +0800 Subject: [PATCH] qcacld-3.0: Update definition about HDD_INVALID_GROUP_ID There is potential issue about array access out of bounds when set CFR configuration. Since HDD_INVALID_GROUP_ID - limit index of array is different to MAX_TA_RA_ENTRIES - array size. This change redefines HDD_INVALID_GROUP_ID and lets it same to MAX_TA_RA_ENTRIES. Change-Id: I5e30c8d2ce93736467cae465b06a1e28e93458d5 CRs-Fixed: 2960584 --- core/hdd/inc/wlan_hdd_cfr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_cfr.h b/core/hdd/inc/wlan_hdd_cfr.h index 7f46df447bec..31279e39312d 100644 --- a/core/hdd/inc/wlan_hdd_cfr.h +++ b/core/hdd/inc/wlan_hdd_cfr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -26,7 +26,9 @@ #ifdef WLAN_CFR_ENABLE -#define HDD_INVALID_GROUP_ID 16 +#include "wlan_cfr_utils_api.h" + +#define HDD_INVALID_GROUP_ID MAX_TA_RA_ENTRIES #define LEGACY_CFR_VERSION 1 #define ENHANCED_CFR_VERSION 2