From: Arran Cudbard-Bell Date: Fri, 5 Jun 2015 17:47:52 +0000 (-0600) Subject: Check if eaptls_prev is NULL X-Git-Tag: release_3_0_9~251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19ed78ad451742839ae43c0d00231f19cb79896b;p=thirdparty%2Ffreeradius-server.git Check if eaptls_prev is NULL --- diff --git a/src/modules/rlm_eap/libeap/eap_tls.c b/src/modules/rlm_eap/libeap/eap_tls.c index ba20c0a5d27..aaff54bdb48 100644 --- a/src/modules/rlm_eap/libeap/eap_tls.c +++ b/src/modules/rlm_eap/libeap/eap_tls.c @@ -402,7 +402,7 @@ static fr_tls_status_t eaptls_verify(eap_handler_t *handler) * The previous packet had the M flags set, but this one doesn't, * this must be the final record fragment */ - if (TLS_MORE_FRAGMENTS(eaptls_prev->flags) && !TLS_MORE_FRAGMENTS(eaptls_packet->flags)) { + if ((eaptls_prev && TLS_MORE_FRAGMENTS(eaptls_prev->flags)) && !TLS_MORE_FRAGMENTS(eaptls_packet->flags)) { RDEBUG2("Got final TLS record fragment"); } else { RDEBUG2("Got additional TLS record fragment. Peer indicated more fragments to follow");