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
This commit is contained in:
parent
99f0032409
commit
7be6dc2e96
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue