This limits the EAP-SIM and EAP-AKA tests to 100 test frames to avoid
undesired timeouts in automated fuzz testing. The real world uses are
limited to 50 rounds, so there is not really any point in trying with
thousands of frames.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
struct eap_sm *sm;
void *priv;
struct eap_method_ret ret;
+ unsigned int count = 0;
wpa_fuzzer_set_debug_level();
pos = data;
end = pos + size;
- while (end - pos > 2) {
+ while (end - pos > 2 && count < 100) {
u16 flen;
struct wpabuf *buf, *req;
wpabuf_free(req);
wpabuf_free(buf);
pos += flen;
+ count++;
}
registered_eap_method->deinit(sm, priv);
struct eap_sm *sm;
void *priv;
struct eap_method_ret ret;
+ unsigned int count = 0;
wpa_fuzzer_set_debug_level();
pos = data;
end = pos + size;
- while (end - pos > 2) {
+ while (end - pos > 2 && count < 100) {
u16 flen;
struct wpabuf *buf, *req;
wpabuf_free(req);
wpabuf_free(buf);
pos += flen;
+ count++;
}
registered_eap_method->deinit(sm, priv);