]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Check if eaptls_prev is NULL
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 5 Jun 2015 17:47:52 +0000 (11:47 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 5 Jun 2015 17:47:52 +0000 (11:47 -0600)
src/modules/rlm_eap/libeap/eap_tls.c

index ba20c0a5d2796e45e1e864860e58be05a4213f34..aaff54bdb486eb65492aff48205088c2cf44b4e7 100644 (file)
@@ -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");