From: iceman1001 Date: Sat, 27 Feb 2016 18:21:49 +0000 (+0100) Subject: BUG: smash stack in addParity call. Didn't take in consideration that it adds bits... X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/98c799ba499b81a02bef8f04ccb5149394c4d4d5 BUG: smash stack in addParity call. Didn't take in consideration that it adds bits per parity to the array.. --- diff --git a/client/cmdlfpyramid.c b/client/cmdlfpyramid.c index 8a48516c..0f992cc2 100644 --- a/client/cmdlfpyramid.c +++ b/client/cmdlfpyramid.c @@ -60,7 +60,9 @@ int GetPyramidBits(uint32_t fc, uint32_t cn, uint8_t *pyramidBits) { wiegand_add_parity(pre+80, wiegand, 24); // add paritybits (bitsource, dest, sourcelen, paritylen, parityType (odd, even,) - addParity(pre+8, pyramidBits+8, 112, 8, 1); + size_t s = addParity(pre+8, pyramidBits+8, 102, 8, 1); + + //printf(" %d |", s); // add checksum uint8_t csBuff[13]; @@ -69,7 +71,6 @@ int GetPyramidBits(uint32_t fc, uint32_t cn, uint8_t *pyramidBits) { uint32_t crc = CRC8Maxim(csBuff, 13); num_to_bytebits(crc, 8, pyramidBits+120); - return 1; }