From 7d26778a2c6a09040054cd4cf960569d7d8b46da Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 13 Nov 2012 23:36:01 +0000 Subject: [PATCH] fix bug in mifare_ultralight_read() --- libfreefare/mifare_ultralight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreefare/mifare_ultralight.c b/libfreefare/mifare_ultralight.c index 63304db..b442aa4 100644 --- a/libfreefare/mifare_ultralight.c +++ b/libfreefare/mifare_ultralight.c @@ -187,7 +187,7 @@ mifare_ultralight_read (MifareTag tag, MifareUltralightPageNumber page, MifareUl if (!MIFARE_ULTRALIGHT(tag)->cached_pages[page]) { BUFFER_INIT (cmd, 2); - BUFFER_ALIAS (res, MIFARE_ULTRALIGHT(tag)->cache[page], sizeof(MifareUltralightPage)); + BUFFER_ALIAS (res, MIFARE_ULTRALIGHT(tag)->cache[page], sizeof(MifareUltralightPage) * 4); BUFFER_APPEND (cmd, 0x30); BUFFER_APPEND (cmd, page);