- added patch to distribution package
- changed debug_sc_result to be a define. this now gets the line of code correct - added checking for input length to functions that parse the bulkin buffer - fixed segfault for GetReadersPACECapabilities when no card is inserted - added length checking of input for EstablishPACEChannel - ccid-test: fixed pbSendBufferEstablish - pcsclite_trunk.patch: - fixed parsing of lengthCertificateDescription - fixed wrong bPINOperation for pace capabilities and execute pace git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@156 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -135,10 +135,10 @@ Index: Drivers/ccid/src/commands.c
|
||||
+ lengthCertificateDescription = *((uint16_t *)
|
||||
+ (TxBuffer + 1 + lengthCHAT + lengthPIN));
|
||||
+
|
||||
+ if (TxLength != 4+lengthCHAT+lengthPIN+lengthCertificateDescription) {
|
||||
+ if (TxLength != 5+lengthCHAT+lengthPIN+lengthCertificateDescription) {
|
||||
+ DEBUG_CRITICAL3("Buffer too small or too big to contain only "
|
||||
+ "CHAT, PIN and certificate description (expected %u, got %u)",
|
||||
+ 4+lengthCHAT+lengthPIN+lengthCertificateDescription, TxLength);
|
||||
+ 5+lengthCHAT+lengthPIN+lengthCertificateDescription, TxLength);
|
||||
+ return_value = IFD_COMMUNICATION_ERROR;
|
||||
+ goto err;
|
||||
+ }
|
||||
@@ -147,7 +147,7 @@ Index: Drivers/ccid/src/commands.c
|
||||
+
|
||||
+ /* bPINOperation: PIN PACE Capabilities */
|
||||
+ return_value = SecurePINPACE(reader_index, TxBuffer, TxLength, RxBuffer,
|
||||
+ RxLength, CCID_CLASS_PIN_PACE_CAPABILITIES);
|
||||
+ RxLength, CCID_CLASS_PIN_PACE_EXECUTE);
|
||||
+
|
||||
+err:
|
||||
+ ccid_descriptor -> readTimeout = old_read_timeout;
|
||||
@@ -160,7 +160,7 @@ Index: Drivers/ccid/src/commands.c
|
||||
+{
|
||||
+ /* bPINOperation: PIN PACE Capabilities */
|
||||
+ return SecurePINPACE(reader_index, TxBuffer, TxLength, RxBuffer,
|
||||
+ RxLength, CCID_CLASS_PIN_PACE_EXECUTE);
|
||||
+ RxLength, CCID_CLASS_PIN_PACE_CAPABILITIES);
|
||||
+}
|
||||
+
|
||||
+static RESPONSECODE SecurePINPACE(unsigned int reader_index,
|
||||
|
||||
Reference in New Issue
Block a user