mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 02:34:48 +08:00
fix: invalidPrintfArg
This commit is contained in:
parent
82f4388abe
commit
ea5dddafef
5 changed files with 10 additions and 10 deletions
|
@ -208,7 +208,7 @@ static unsigned char *crypto_pk_polarssl_encrypt(const struct crypto_pk *_cp, co
|
|||
|
||||
res = mbedtls_rsa_public(&cp->ctx, buf, result);
|
||||
if (res) {
|
||||
printf("RSA encrypt failed. Error: %x data len: %zd key len: %zd\n", res * -1, len, keylen);
|
||||
printf("RSA encrypt failed. Error: %x data len: %zu key len: %zu\n", res * -1, len, keylen);
|
||||
free(result);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ static unsigned char *crypto_pk_polarssl_decrypt(const struct crypto_pk *_cp, co
|
|||
|
||||
res = mbedtls_rsa_private(&cp->ctx, NULL, NULL, buf, result); // CHECK???
|
||||
if (res) {
|
||||
printf("RSA decrypt failed. Error: %x data len: %zd key len: %zd\n", res * -1, len, keylen);
|
||||
printf("RSA decrypt failed. Error: %x data len: %zu key len: %zu\n", res * -1, len, keylen);
|
||||
free(result);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -483,7 +483,7 @@ struct emv_pk *emv_pk_get_ca_pk(const unsigned char *rid, unsigned char idx) {
|
|||
if (!pk)
|
||||
return NULL;
|
||||
|
||||
printf("Verifying CA PK for %02hhx:%02hhx:%02hhx:%02hhx:%02hhx IDX %02hhx %zd bits...",
|
||||
printf("Verifying CA PK for %02hhx:%02hhx:%02hhx:%02hhx:%02hhx IDX %02hhx %zu bits...",
|
||||
pk->rid[0],
|
||||
pk->rid[1],
|
||||
pk->rid[2],
|
||||
|
|
|
@ -84,7 +84,7 @@ void print_mpi(const char *msg, int radix, const mbedtls_mpi *X) {
|
|||
size_t len = 0;
|
||||
|
||||
mbedtls_mpi_write_string(X, radix, Xchar, sizeof(Xchar), &len);
|
||||
printf("%s[%ld] %s\n", msg, len, Xchar);
|
||||
printf("%s[%zu] %s\n", msg, len, Xchar);
|
||||
}
|
||||
|
||||
bool emv_rocacheck(const unsigned char *buf, size_t buflen, bool verbose) {
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
void cmd_debug(UsbCommand *c) {
|
||||
// Debug
|
||||
printf("UsbCommand length[len=%zd]\n", sizeof(UsbCommand));
|
||||
printf(" cmd[len=%zd]: %016" PRIx64"\n", sizeof(c->cmd), c->cmd);
|
||||
printf(" arg0[len=%zd]: %016" PRIx64"\n", sizeof(c->arg[0]), c->arg[0]);
|
||||
printf(" arg1[len=%zd]: %016" PRIx64"\n", sizeof(c->arg[1]), c->arg[1]);
|
||||
printf(" arg2[len=%zd]: %016" PRIx64"\n", sizeof(c->arg[2]), c->arg[2]);
|
||||
printf(" data[len=%zd]: ", sizeof(c->d.asBytes));
|
||||
printf(" cmd[len=%zu]: %016" PRIx64"\n", sizeof(c->cmd), c->cmd);
|
||||
printf(" arg0[len=%zu]: %016" PRIx64"\n", sizeof(c->arg[0]), c->arg[0]);
|
||||
printf(" arg1[len=%zu]: %016" PRIx64"\n", sizeof(c->arg[1]), c->arg[1]);
|
||||
printf(" arg2[len=%zu]: %016" PRIx64"\n", sizeof(c->arg[2]), c->arg[2]);
|
||||
printf(" data[len=%zu]: ", sizeof(c->d.asBytes));
|
||||
|
||||
for (size_t i = 0; i < 16; i++)
|
||||
printf("%02x", c->d.asBytes[i]);
|
||||
|
|
|
@ -206,7 +206,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
|||
}
|
||||
}
|
||||
}
|
||||
printf("[=] UART Setting serial baudrate %i\n", speed);
|
||||
printf("[=] UART Setting serial baudrate %u\n", speed);
|
||||
return sp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue