mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
BUG: smash stack in addParity call. Didn't take in consideration that it adds bits per parity to the array..
This commit is contained in:
parent
90639dd1cc
commit
98c799ba49
1 changed files with 3 additions and 2 deletions
|
@ -60,7 +60,9 @@ int GetPyramidBits(uint32_t fc, uint32_t cn, uint8_t *pyramidBits) {
|
||||||
wiegand_add_parity(pre+80, wiegand, 24);
|
wiegand_add_parity(pre+80, wiegand, 24);
|
||||||
|
|
||||||
// add paritybits (bitsource, dest, sourcelen, paritylen, parityType (odd, even,)
|
// 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
|
// add checksum
|
||||||
uint8_t csBuff[13];
|
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);
|
uint32_t crc = CRC8Maxim(csBuff, 13);
|
||||||
num_to_bytebits(crc, 8, pyramidBits+120);
|
num_to_bytebits(crc, 8, pyramidBits+120);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue