Fixed the number of elements passed to resolvePath()

resolvePath() is expecting the number of configuration
files. So pass the number of elements in the array of
pointers, instead of array size.

Bug: 219519897
Test: Manual - Wifi STA/P2P turn on/off multiple times
Change-Id: I5aa18f6435dfb913ea47340b62267cda02f43a58
diff --git a/wpa_supplicant/aidl/supplicant.cpp b/wpa_supplicant/aidl/supplicant.cpp
index 208491c..ee6f809 100644
--- a/wpa_supplicant/aidl/supplicant.cpp
+++ b/wpa_supplicant/aidl/supplicant.cpp
@@ -144,7 +144,8 @@
 		return -1;
 	}
 	const char* path =
-	    resolvePath(kTemplateConfPaths, sizeof(kTemplateConfPaths));
+	    resolvePath(kTemplateConfPaths,
+	    sizeof(kTemplateConfPaths)/sizeof(kTemplateConfPaths[0]));
 	if (path != nullptr) {
 		ret = copyFileIfItExists(path, config_file_path);
 		if (ret == 0) {
@@ -342,7 +343,7 @@
 	iface_params.confname = kP2pIfaceConfPath;
 	const char* path = resolvePath(
 		    kP2pIfaceConfOverlayPaths,
-		    sizeof(kP2pIfaceConfOverlayPaths));
+		    sizeof(kP2pIfaceConfOverlayPaths)/sizeof(kP2pIfaceConfOverlayPaths[0]));
 	if (path != nullptr) {
 		iface_params.confanother = path;
 	}
@@ -402,7 +403,7 @@
 	iface_params.confname = kStaIfaceConfPath;
 	const char* path = resolvePath(
 		    kStaIfaceConfOverlayPaths,
-		    sizeof(kStaIfaceConfOverlayPaths));
+		    sizeof(kStaIfaceConfOverlayPaths)/sizeof(kStaIfaceConfOverlayPaths[0]));
 	if (path != nullptr) {
 		iface_params.confanother = path;
 	}