aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-06-27 18:19:29 +0300
committerJouni Malinen <j@w1.fi>2012-06-27 21:21:11 +0300
commit7be6dc2e96f160743a8db0fb7bc62cd713a00c7c (patch)
treeaeec9c36489d51cf552c145eb52d2c7c22c4b7c6 /src/wps
parent99f00324098bc9f9fb447f331e297c495dd50390 (diff)
downloadexternal_wpa_supplicant_8_ti-7be6dc2e96f160743a8db0fb7bc62cd713a00c7c.zip
external_wpa_supplicant_8_ti-7be6dc2e96f160743a8db0fb7bc62cd713a00c7c.tar.gz
external_wpa_supplicant_8_ti-7be6dc2e96f160743a8db0fb7bc62cd713a00c7c.tar.bz2
WPS: Fix NFC password token building with WPS 2.0
The earlier WPS 2.0 changes did not increase the wpabuf size when adding a new attribute to the NFC password token. This could result in aborting the application on wpabuf overflow if NFC out-of-band mechanism is used with WPS 2.0 enabled. Signed-hostap: Jouni Malinen <j@w1.fi> intended-for: hostap-1
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wps/wps_common.c b/src/wps/wps_common.c
index 2dff4b2..20e0824 100644
--- a/src/wps/wps_common.c
+++ b/src/wps/wps_common.c
@@ -339,7 +339,7 @@ static struct wpabuf * wps_get_oob_dev_pwd(struct wps_context *wps)
{
struct wpabuf *data;
- data = wpabuf_alloc(9 + WPS_OOB_DEVICE_PASSWORD_ATTR_LEN);
+ data = wpabuf_alloc(200);
if (data == NULL) {
wpa_printf(MSG_ERROR, "WPS: Failed to allocate memory for OOB "
"device password attribute");