diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-11-08 09:14:06 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-11-08 09:14:06 +0000 |
commit | 27e8fe5394184505e09318d3691761da59ecdff5 (patch) | |
tree | 3735dd641f329d42a4f8a28b38972bf88656dca7 /src | |
parent | 2ac9e1e23e62517a2dcbd3ae524f93e9810e6fd6 (diff) |
add -EPERM return in case of missing authentication
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1661 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'src')
-rw-r--r-- | src/rfid_proto_mifare_classic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rfid_proto_mifare_classic.c b/src/rfid_proto_mifare_classic.c index 10de288..99386a1 100644 --- a/src/rfid_proto_mifare_classic.c +++ b/src/rfid_proto_mifare_classic.c @@ -64,6 +64,9 @@ mfcl_read(struct rfid_protocol_handle *ph, unsigned int page, if (ret < 0) return ret; + if (real_rx_len == 1 && *rx_buf == 0x04) + return -EPERM; + if (real_rx_len < *rx_len) *rx_len = real_rx_len; |