unify test - step 2

This commit is contained in:
iceman1001 committed 2025-03-25 10:17:42 +01:00
1 parent 875b3c44b4
commit ad292e8810
70 files changed
+272 -195

No files matched your search

+3 -1
View File
@@ -81,11 +81,13 @@ static int CmdHFEPACollectPACENonces(const char *Cmd) {
} else {
size_t nonce_length = resp.oldarg[1];
size_t nonce_length_bytes = 2 * nonce_length + 1;
char *nonce = (char *) calloc(2 * nonce_length + 1, sizeof(uint8_t));
if (nonce == NULL) {
PrintAndLogEx(FAILED, "Memory allocation failed for nonce");
PrintAndLogEx(WARNING, "Failed to allocate memory");
return PM3_EMALLOC;
}
for (int j = 0; j < nonce_length; j++) {
int nonce_offset = 2 * j;
snprintf(nonce + nonce_offset, (nonce_length_bytes * sizeof(uint8_t)) - nonce_offset, "%02X", resp.data.asBytes[j]);