[HAL] Increase interface name array size to accomodate P2P group interface
Sreenath Sharma [Mon, 23 Nov 2015 09:43:13 +0000 (14:43 +0530)]
Increase interface name array size from 9 (8 + 1) to accommodate P2P
group interface. The P2P group interface name is p2p-wlan0-x, where x
can go up to maximum integer value. Therefore, increasing interface name
array size to 17 (IFNAMSIZ + 1). Otherwise halutil logger commands will
return strcpy() error once P2P group interface is up.

FORTIFY_SOURCE: strcpy: prevented write past end of buffer. Calling
abort().

Change-Id: I666bf4d4687ce05b8e6550fe21a0801e5e2ff42c
Signed-off-by: Sreenath Sharma <sreenats@broadcom.com>

bcmdhd/wifi_hal/common.h

index 118e0fc..6bea773 100644 (file)
@@ -142,7 +142,7 @@ typedef struct {
 
 typedef struct {
     wifi_handle handle;                             // handle to wifi data
-    char name[8+1];                                 // interface name + trailing null
+    char name[IFNAMSIZ+1];                          // interface name + trailing null
     int  id;                                        // id to use when talking to driver
 } interface_info;