Limit KEYS_IN_BLOCK to a maximum of 255
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
1 parent
c521e9f641
commit
d99fc10609
1 file changed
+1
-1
@@ -66,7 +66,7 @@ typedef struct {
|
||||
//uint8_t foundKey[2];
|
||||
} icesector_t;
|
||||
|
||||
#define KEYS_IN_BLOCK ((PM3_CMD_DATA_SIZE - 5) / MIFARE_KEY_SIZE)
|
||||
#define KEYS_IN_BLOCK MIN((PM3_CMD_DATA_SIZE - 5) / MIFARE_KEY_SIZE, 255)
|
||||
#define KEYBLOCK_SIZE (KEYS_IN_BLOCK * MIFARE_KEY_SIZE)
|
||||
#define CANDIDATE_SIZE (0xFFFF * MIFARE_KEY_SIZE)
|
||||
|
||||
|
||||
Reference in new issue
Block a user