X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=src%2Frfid_proto_mifare_ul.c;h=8981b5e7792f0e7dc42fd9b9aaa61bc228288cfe;hb=2da53a43badc7bd578ab5df850648f14807aecd2;hp=0ea55d2671881a562ec0211077a8dc8e51f04d6e;hpb=c972071a03825d8fe595d33f9128b4341b0478bd;p=librfid diff --git a/src/rfid_proto_mifare_ul.c b/src/rfid_proto_mifare_ul.c index 0ea55d2..8981b5e 100644 --- a/src/rfid_proto_mifare_ul.c +++ b/src/rfid_proto_mifare_ul.c @@ -112,6 +112,14 @@ static struct rfid_protocol_handle * mful_init(struct rfid_layer2_handle *l2h) { struct rfid_protocol_handle *ph; + + if (l2h->l2->id != RFID_LAYER2_ISO14443A) + return NULL; + + /* according to "Functional Specification Rev. 3.0 */ + if (l2h->uid_len != 7) + return NULL; + ph = malloc_protocol_handle(sizeof(struct rfid_protocol_handle)); return ph; }