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
This commit is contained in:
laforge 2006-09-22 21:00:27 +00:00
parent 66547428ea
commit 1b891c2d37
1 changed files with 1 additions and 1 deletions

View File

@ -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;