fix #1286 - wrong pwd/key length checks
This commit is contained in:
1 parent
d9f1b97752
commit
59b86af1a8
2 files changed
+5
-4
No files matched your search
@@ -559,13 +559,13 @@ static int CmdLFHitagReader(const char *Cmd) {
|
||||
}
|
||||
|
||||
// sanity checks
|
||||
if (keylen != 0 && keylen != 6) {
|
||||
PrintAndLogEx(WARNING, "Wrong KEY len expected 0 or 6, got %d", keylen);
|
||||
if (keylen != 0 && keylen != 4) {
|
||||
PrintAndLogEx(WARNING, "Wrong KEY len expected 0 or 4, got %d", keylen);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
if (nalen != 0 && nalen != 8) {
|
||||
PrintAndLogEx(WARNING, "Wrong NR/AR len expected 0 or 8, got %d", nalen);
|
||||
if (nalen != 0 && nalen != 6) {
|
||||
PrintAndLogEx(WARNING, "Wrong NR/AR len expected 0 or 6, got %d", nalen);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef _NDEF_H_
|
||||
#define _NDEF_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "common.h"
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in new issue
Block a user