ccid: Fix overflow in Fi value

The Fi value can easily exceed 8bits. Even its default of 372 already
exceeds 256...

Change-Id: If2e2c46411d724883dca48f24e08d002e6670299
This commit is contained in:
Harald Welte 2019-05-18 11:18:39 +02:00 committed by Harald Welte
parent 2de998aa90
commit 860d0069b2
2 changed files with 4 additions and 4 deletions

View File

@ -19,8 +19,8 @@ struct msgb;
struct ccid_pars_decoded {
/* global for T0/T1 */
uint8_t fi;
uint8_t di;
uint32_t fi;
uint32_t di;
enum ccid_clock_stop clock_stop;
bool inverse_convention;

View File

@ -32,8 +32,8 @@ static const uint8_t sysmousim_sjs1_atr[] = {
0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 };
static const struct ccid_pars_decoded slotsim_def_pars = {
.fi = 0,
.di = 0,
.fi = 372,
.di = 1,
.clock_stop = CCID_CLOCK_STOP_NOTALLOWED,
.inverse_convention = false,
.t0 = {