prev_eap_ds may be NULL. Don't dereference it.
authoraland <aland>
Mon, 5 Mar 2007 14:11:55 +0000 (14:11 +0000)
committeraland <aland>
Mon, 5 Mar 2007 14:11:55 +0000 (14:11 +0000)
Bug found by Coverity

src/modules/rlm_eap/libeap/eap_tls.c

index 4e36833..4450bb4 100644 (file)
@@ -332,7 +332,8 @@ static eaptls_status_t eaptls_verify(EAP_HANDLER *handler)
            ((eap_ds->response->length == EAP_HEADER_LEN + 2) &&
             ((eaptls_packet->flags & 0xc0) == 0x00))) {
 
-               if (prev_eap_ds->request->id == eap_ds->response->id) {
+               if (prev_eap_ds &&
+                   (prev_eap_ds->request->id == eap_ds->response->id)) {
                        /*
                         *      Run the ACK handler directly from here.
                         */