Browse Source

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
Wu Gao 3 years ago
parent
commit
aa3a6422a4
1 changed files with 4 additions and 2 deletions
  1. 4 2
      core/hdd/inc/wlan_hdd_cfr.h

+ 4 - 2
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