diff options
Diffstat (limited to 'contrib/hostapd/eap_tls_common.c')
-rw-r--r-- | contrib/hostapd/eap_tls_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/hostapd/eap_tls_common.c b/contrib/hostapd/eap_tls_common.c index 2a089d4..ce61729 100644 --- a/contrib/hostapd/eap_tls_common.c +++ b/contrib/hostapd/eap_tls_common.c @@ -113,6 +113,11 @@ int eap_tls_data_reassemble(struct eap_sm *sm, struct eap_ssl_data *data, u8 *buf; if (data->tls_in_left > *in_len || data->tls_in) { + if (*in_len == 0) { + wpa_printf(MSG_INFO, "SSL: Empty fragment when trying " + "to reassemble"); + return -1; + } if (data->tls_in_len + *in_len > 65536) { /* Limit length to avoid rogue peers from causing large * memory allocations. */ |