diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-07-19 18:53:57 -0700 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-07-20 22:56:58 -0700 |
commit | 08b19cb4049655f7a0703bbfb994ddf4c64f7276 (patch) | |
tree | e7e704ec71969593b0130cf65ef25ad27cb41f24 /src | |
parent | 7f6ec672ea429cc02bbe5532f3cc9e8892adb00c (diff) | |
download | external_wpa_supplicant_8_ti-08b19cb4049655f7a0703bbfb994ddf4c64f7276.zip external_wpa_supplicant_8_ti-08b19cb4049655f7a0703bbfb994ddf4c64f7276.tar.gz external_wpa_supplicant_8_ti-08b19cb4049655f7a0703bbfb994ddf4c64f7276.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/wps/wps_er.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wps/wps_er.c b/src/wps/wps_er.c index 9c47aaf..6d7455e 100644 --- a/src/wps/wps_er.c +++ b/src/wps/wps_er.c @@ -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) { |