Add extra validation of EAP header length field
These validation steps are already done in the EAP parsing code and in the EAP methods, but the additional check is defensive programming and can make the validation of received EAP messages more easier to understand. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
bf0d9ae40f
commit
f54eb34995
4 changed files with 66 additions and 17 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* EAP common peer/server definitions
|
||||
* Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "wpabuf.h"
|
||||
|
||||
int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload);
|
||||
const u8 * eap_hdr_validate(int vendor, EapType eap_type,
|
||||
const struct wpabuf *msg, size_t *plen);
|
||||
struct wpabuf * eap_msg_alloc(int vendor, EapType type, size_t payload_len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue