qcacld-3.0: Add null pointer check and fix buffer overflow in sap

Add null pointer validation and fix possible buffer overflow issue
in sap module.

Change-Id: I314e07a31368dd3ca854b9aeab4a0bce0402a81b
CRs-Fixed: 2162246
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index 45243c4..0e353d1 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -2507,7 +2507,7 @@
 	uint8_t best_ch_num = SAP_CHANNEL_NOT_SELECTED;
 	uint32_t ht40plus2gendch = 0;
 	v_REGDOMAIN_t domain;
-	uint8_t country[CDS_COUNTRY_CODE_LEN];
+	uint8_t country[CDS_COUNTRY_CODE_LEN + 1];
 #ifdef SOFTAP_CHANNEL_RANGE
 	uint8_t count;
 	uint32_t start_ch_num, end_ch_num, tmp_ch_num, operating_band = 0;