FreeCalypso > hg > fc-pcsc-tools
changeset 79:b0982c0cf54d
EF select logic: detect invalid record count > 255
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 17 Feb 2021 05:21:34 +0000 |
parents | 702c2c40e51a |
children | 54cebab70c19 |
files | simtool/select.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/simtool/select.c Wed Feb 17 05:07:54 2021 +0000 +++ b/simtool/select.c Wed Feb 17 05:21:34 2021 +0000 @@ -212,6 +212,11 @@ return(-1); } curfile_record_count = curfile_total_size / curfile_record_len; + if (curfile_record_count > 255) { + fprintf(stderr, + "error: EF record count exceeds protocol limit\n"); + return(-1); + } break; default: fprintf(stderr, "error: unknown EF structure code %02X\n",