From 1b891c2d37b9225d6d9e80bc7f16f4ae78cc5a83 Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 22 Sep 2006 21:00:27 +0000 Subject: memset the size of the structure, rather than the pointer to it. Usually this problem results in memsetting too litttle... but here we actually have a less-than-four-byte-structure and we end up messing up the stack :( git-svn-id: https://svn.gnumonks.org/trunk/librfid@1886 e0336214-984f-0b4b-a45f-81c69e1f0ede --- src/rfid_asic_rc632.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/rfid_asic_rc632.c b/src/rfid_asic_rc632.c index ac3df2c..39e1273 100644 --- a/src/rfid_asic_rc632.c +++ b/src/rfid_asic_rc632.c @@ -758,7 +758,7 @@ rc632_iso14443a_transceive_sf(struct rfid_asic_handle *handle, u_int8_t tx_buf[1]; u_int8_t rx_len = 2; - memset(atqa, 0, sizeof(atqa)); + memset(atqa, 0, sizeof(*atqa)); tx_buf[0] = cmd; -- cgit v1.2.3