Commit 4c116492 authored by Ludovic Rousseau's avatar Ludovic Rousseau

ccid_open_hack_pre(): fix bug for ICCD type A & B devices

The CmdPowerOn() used a wrong value for voltage selection.

Thanks to Coverity:
CID 1453380 (#2 of 2): Out-of-bounds access (OVERRUN)
6. overrun-call: Overrunning callee's array of size 4 by passing
argument 8 in call to CmdPowerOn.
parent d8eec805
......@@ -122,7 +122,7 @@ int ccid_open_hack_pre(unsigned int reader_index)
DEBUG_COMM("ICCD type A");
(void)CmdPowerOff(reader_index);
(void)CmdPowerOn(reader_index, &n, tmp, CCID_CLASS_AUTO_VOLTAGE);
(void)CmdPowerOn(reader_index, &n, tmp, VOLTAGE_AUTO);
(void)CmdPowerOff(reader_index);
}
......@@ -142,7 +142,7 @@ int ccid_open_hack_pre(unsigned int reader_index)
}
(void)CmdPowerOff(reader_index);
(void)CmdPowerOn(reader_index, &n, tmp, CCID_CLASS_AUTO_VOLTAGE);
(void)CmdPowerOn(reader_index, &n, tmp, VOLTAGE_AUTO);
(void)CmdPowerOff(reader_index);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment