mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
Use a typed constant and see if that makes CodeQL happy :)
This commit is contained in:
parent
15b541c2ea
commit
a7980d8e8a
1 changed files with 3 additions and 2 deletions
|
@ -654,9 +654,10 @@ static int PivGetDataByTagAndPrint(Iso7816CommandChannel channel, const uint8_t
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PivAuthenticateSign(Iso7816CommandChannel channel, uint8_t alg_id, uint8_t key_id, uint8_t nonce[], size_t nonce_len, void **result, bool decodeTLV, bool verbose) {
|
static int PivAuthenticateSign(Iso7816CommandChannel channel, uint8_t alg_id, uint8_t key_id, uint8_t nonce[], size_t nonce_len, void **result, bool decodeTLV, bool verbose) {
|
||||||
if (nonce_len > 0x7A) {
|
const size_t MAX_NONCE_LEN = 0x7a;
|
||||||
|
if (nonce_len > MAX_NONCE_LEN) {
|
||||||
if (verbose == true) {
|
if (verbose == true) {
|
||||||
PrintAndLogEx(WARNING, "Nonce cannot exceed %d bytes. Got %d bytes.", 0x7a, nonce_len);
|
PrintAndLogEx(WARNING, "Nonce cannot exceed %d bytes. Got %d bytes.", MAX_NONCE_LEN, nonce_len);
|
||||||
}
|
}
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue