card-dnie: use size_t-specific format specifier in printf

Instead ogf blindly using "%lu", use "%"SC_FORMAT_LEN_SIZE_T"u"
to cope with the various implementations.

This fixes a bug introduced in commit 20b1d829
This commit is contained in:
Peter Marschall 2018-06-03 12:26:51 +02:00 committed by Frank Morgner
parent 8d503df754
commit a884953c85
1 changed files with 3 additions and 1 deletions

View File

@ -767,7 +767,9 @@ static int dnie_sm_free_wrapped_apdu(struct sc_card *card,
memcpy(plain->resp, (*sm_apdu)->resp, (*sm_apdu)->resplen);
plain->resplen = (*sm_apdu)->resplen;
} else {
sc_log(card->ctx, "Invalid initial length, needed %lu bytes but has %lu",
sc_log(card->ctx, "Invalid initial length,"
" needed %"SC_FORMAT_LEN_SIZE_T"u bytes"
" but has %"SC_FORMAT_LEN_SIZE_T"u",
(*sm_apdu)->resplen, plain->resplen);
rv = SC_ERROR_BUFFER_TOO_SMALL;
}