From 248a277403de24869114e75330fa3317199bf7e8 Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 8 Feb 2008 15:06:05 +0000 Subject: 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 --- src/rfid_layer2_iso14443a.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; }; -- cgit v1.2.3