WPS: Limit WPS ER event_id < 2^31 bits to avoid issues with atoi()
Previously, large event_id values (> 2^31) resulted in integer overflow that would make ER drop all events from the AP.
This commit is contained in:
parent
7f6ec672ea
commit
08b19cb404
1 changed files with 2 additions and 0 deletions
|
@ -1172,6 +1172,8 @@ wps_er_init(struct wps_context *wps, const char *ifname, const char *filter)
|
||||||
wps_er_deinit(er, NULL, NULL);
|
wps_er_deinit(er, NULL, NULL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
/* Limit event_id to < 32 bits to avoid issues with atoi() */
|
||||||
|
er->event_id &= 0x0fffffff;
|
||||||
|
|
||||||
if (filter) {
|
if (filter) {
|
||||||
if (inet_aton(filter, &er->filter_addr) == 0) {
|
if (inet_aton(filter, &er->filter_addr) == 0) {
|
||||||
|
|
Loading…
Reference in a new issue