Skip to content
Snippets Groups Projects
Commit c7228ea0 authored by Anjan Chanda's avatar Anjan Chanda
Browse files

fix array size bounds for max interfaces

parent 1de666d2
No related branches found
No related tags found
Loading
...@@ -78,7 +78,7 @@ static char * etostr2(uint32_t e, char *out, int elen, const char **arr, char *s ...@@ -78,7 +78,7 @@ static char * etostr2(uint32_t e, char *out, int elen, const char **arr, char *s
return out; return out;
} }
static int uci_get_wifi_devices(char iflist[][8]) static int uci_get_wifi_devices(char iflist[][16])
{ {
static struct uci_context *ctx; static struct uci_context *ctx;
static struct uci_package *pkg; static struct uci_package *pkg;
...@@ -344,7 +344,7 @@ static int wl_assoclist(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -344,7 +344,7 @@ static int wl_assoclist(struct ubus_context *ctx, struct ubus_object *obj,
a = blobmsg_open_array(&bb, "assoclist"); a = blobmsg_open_array(&bb, "assoclist");
if (!(tb[VIF_NAME])) { if (!(tb[VIF_NAME])) {
char wdevs[16][8]; char wdevs[16][16];
int n; int n;
n = uci_get_wifi_devices(wdevs); n = uci_get_wifi_devices(wdevs);
...@@ -509,7 +509,7 @@ static int wl_stas(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -509,7 +509,7 @@ static int wl_stas(struct ubus_context *ctx, struct ubus_object *obj,
if (!(tb[STAINFO_VIF_NAME])) { if (!(tb[STAINFO_VIF_NAME])) {
char label[16] = {0}; char label[16] = {0};
char wdevs[16][8]; // 8 --> max interfaces char wdevs[16][16];
void *a; void *a;
int n; int n;
int i; int i;
...@@ -560,7 +560,7 @@ static int wl_radios(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -560,7 +560,7 @@ static int wl_radios(struct ubus_context *ctx, struct ubus_object *obj,
char bitrate[20]; char bitrate[20];
char frequency[10]; char frequency[10];
char bandwidth[10]; char bandwidth[10];
char wdevs[16][8]; // 8 --> max interfaces char wdevs[16][16];
int n; int n;
struct blob_buf bb; struct blob_buf bb;
...@@ -1181,7 +1181,7 @@ static int nbr_list(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -1181,7 +1181,7 @@ static int nbr_list(struct ubus_context *ctx, struct ubus_object *obj,
if (!(tb[NBR_LIST_IFNAME])) { if (!(tb[NBR_LIST_IFNAME])) {
char label[16] = {0}; char label[16] = {0};
char wdevs[16][8]; // 8 --> max interfaces char wdevs[16][16]; // 8 --> max interfaces
void *a; void *a;
int n; int n;
int i; int i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment