Avoid theoretical NULL pointer dereference during TLS reassemble

This function does not get called with in_data == NULL in practice, but
it seems to be at least partly prepared for that case, so better make it
consistent by handling the NULL value throughout the function.
This commit is contained in:
Jouni Malinen 2011-04-14 02:45:14 +03:00 committed by Jouni Malinen
parent b211f3eb71
commit 066608f3ff

View file

@ -361,7 +361,8 @@ static int eap_peer_tls_reassemble_fragment(struct eap_ssl_data *data,
eap_peer_tls_reset_input(data);
return -1;
}
wpabuf_put_buf(data->tls_in, in_data);
if (in_data)
wpabuf_put_buf(data->tls_in, in_data);
data->tls_in_left -= in_len;
if (data->tls_in_left > 0) {