gp: Correctly check for the CPLC data length

This commit is contained in:
Jakub Jelen 2019-11-29 16:23:02 +01:00 committed by Frank Morgner
parent 4f3d87d03c
commit 249e928176
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ gp_get_cplc_data(struct sc_card *card, global_platform_cplc_data_t *cplc_data)
/* We expect this will fill the whole structure in the argument.
* If we got something else, report error */
if ((size_t)apdu.resplen < sizeof(cplc_data)) {
if ((size_t)apdu.resplen < sizeof(global_platform_cplc_data_t)) {
LOG_FUNC_RETURN(card->ctx, SC_ERROR_CORRUPTED_DATA);
}
LOG_FUNC_RETURN(card->ctx, apdu.resplen);