[Pcsclite-cvs-commit] r4401 - /trunk/Drivers/ccid/src/ccid_usb.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Sep 28 14:06:50 UTC 2009


Author: rousseau
Date: Mon Sep 28 14:06:49 2009
New Revision: 4401

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4401
Log:
OpenUSBByName(): make the libhal scheme parsing more robust.
Readers serial "numbers" may contain '_' characters

Modified:
    trunk/Drivers/ccid/src/ccid_usb.c

Modified: trunk/Drivers/ccid/src/ccid_usb.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ccid_usb.c?rev=4401&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c (original)
+++ trunk/Drivers/ccid/src/ccid_usb.c Mon Sep 28 14:06:49 2009
@@ -230,14 +230,8 @@
 				/* skip the HAL header */
 				&& (p += sizeof(HAL_HEADER)-1)
 
-				/* search the '_' before PID */
-				&& (p = strchr(++p, '_'))
-
-				/* search the '_' before SERIAL */
-				&& (p = strchr(++p, '_'))
-
-				/* search the '_' before ifX */
-				&& (p = strchr(++p, '_'))
+				/* search the last '_' */
+				&& (p = strrchr(++p, '_'))
 				&& (0 == strncmp(++p, "if", 2))
 			   )
 			{




More information about the Pcsclite-cvs-commit mailing list