Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wifimngr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HAL
wifimngr
Commits
c7228ea0
Commit
c7228ea0
authored
6 years ago
by
Anjan Chanda
Browse files
Options
Downloads
Patches
Plain Diff
fix array size bounds for max interfaces
parent
1de666d2
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wifimngr.c
+5
-5
5 additions, 5 deletions
wifimngr.c
with
5 additions
and
5 deletions
wifimngr.c
+
5
−
5
View file @
c7228ea0
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment