Update card-epass2003.c

This commit is contained in:
ihsinme 2021-02-05 18:26:39 +03:00 committed by Jakub Jelen
parent 49788678fe
commit 0a3d7a28a7
1 changed files with 1 additions and 1 deletions

View File

@ -948,7 +948,7 @@ decrypt_response(struct sc_card *card, unsigned char *in, size_t inlen, unsigned
des3_decrypt_cbc(exdata->sk_enc, 16, iv, &in[i], cipher_len - 1, plaintext);
/* unpadding */
while (0x80 != plaintext[cipher_len - 2] && (cipher_len - 2 > 0))
while (0x80 != plaintext[cipher_len - 2] && (cipher_len > 2))
cipher_len--;
if (2 == cipher_len || *out_len < cipher_len - 2)