diff options
author | Jakub Jelen <[email protected]> | 2024-05-28 14:57:41 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-05-28 14:57:58 +0000 |
commit | 4c1b0070354db0b9b0516d9e5453e47fc03a0aac (patch) | |
tree | 191719cbf06f7101a4d8a996f9ac3e9ea6809917 /scd | |
parent | agent: Avoid uninitialized access in GENKEY command on parameter error. (diff) | |
download | gnupg-4c1b0070354db0b9b0516d9e5453e47fc03a0aac.tar.gz gnupg-4c1b0070354db0b9b0516d9e5453e47fc03a0aac.zip |
scd: Avoid buffer overrun with more than 16 PC/SC readers.
* scd/apdu.c (apdu_dev_list_start): Fix end condition.
--
Signed-off-by: Jakub Jelen <[email protected]>
This is part of
GnuPG-bug-id: 7129
Fixes-commit: e8534f899915a039610973a84042cbe25a5e7ce2
Diffstat (limited to 'scd')
-rw-r--r-- | scd/apdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index 98158648b..2e38a273a 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2094,7 +2094,7 @@ apdu_dev_list_start (const char *portstr, struct dev_list **l_p) nreader -= n + 1; p += n + 1; dl->idx_max++; - if (dl->idx_max > MAX_READER) + if (dl->idx_max >= MAX_READER) { log_error ("too many readers from pcsc_list_readers\n"); dl->idx_max--; |