mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-29 02:38:22 -05:00
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
@ -1172,6 +1172,8 @@ wps_er_init(struct wps_context *wps, const char *ifname, const char *filter)
|
||||
wps_er_deinit(er, NULL, NULL);
|
||||
return NULL;
|
||||
}
|
||||
/* Limit event_id to < 32 bits to avoid issues with atoi() */
|
||||
er->event_id &= 0x0fffffff;
|
||||
|
||||
if (filter) {
|
||||
if (inet_aton(filter, &er->filter_addr) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user