summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2008-02-08 15:06:05 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2008-02-08 15:06:05 +0000
commit248a277403de24869114e75330fa3317199bf7e8 (patch)
tree0c22cb51d263f01d69402fb6ed5390bab7e5935e
parentf8167ee2831901fe6db0cc37c8c8b9f85009b7db (diff)
fix bugs for optlen setting in layer2_Getopt of iso14443a (Uwe Hermann)
git-svn-id: https://svn.gnumonks.org/trunk/librfid@2076 e0336214-984f-0b4b-a45f-81c69e1f0ede
-rw-r--r--src/rfid_layer2_iso14443a.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rfid_layer2_iso14443a.c b/src/rfid_layer2_iso14443a.c
index 90af0f2..528c5fb 100644
--- a/src/rfid_layer2_iso14443a.c
+++ b/src/rfid_layer2_iso14443a.c
@@ -330,14 +330,16 @@ iso14443a_getopt(struct rfid_layer2_handle *handle, int optname,
switch (optname) {
case RFID_OPT_14443A_SAK:
*opt_u8 = h->sak;
- optlen = sizeof(*opt_u8);
+ *optlen = sizeof(*opt_u8);
break;
case RFID_OPT_14443A_ATQA:
*atqa = h->atqa;
+ *optlen = sizeof(*atqa)
ret = 0;
break;
case RFID_OPT_14443A_WUPA:
*wupa = ((handle->flags & RFID_OPT_LAYER2_WUP) != 0);
+ *optlen = sizeof(*wupa);
ret = 0;
break;
};
personal git repositories of Harald Welte. Your mileage may vary