[Pcsclite-cvs-commit] r6519 - /trunk/PCSC/src/hotplug_libudev.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Jan 28 15:58:47 UTC 2013


Author: rousseau
Date: Mon Jan 28 15:58:47 2013
New Revision: 6519

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6519
Log:
Check the Info.plist file is (a minimum) correct

The number of products, manufacturers and reader names should be the
same. Otherwise the Info.plist file is corrupted and bad things may
happen, like a crash of pcscd.

Thanks to Nikita Bige for the bug report
https://bugzilla.redhat.com/show_bug.cgi?id=904932

Modified:
    trunk/PCSC/src/hotplug_libudev.c

Modified: trunk/PCSC/src/hotplug_libudev.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libudev.c?rev=6519&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libudev.c (original)
+++ trunk/PCSC/src/hotplug_libudev.c Mon Jan 28 15:58:47 2013
@@ -151,6 +151,13 @@
 			GET_KEY(PCSCLITE_HP_MANUKEY_NAME, &manuIDs)
 			GET_KEY(PCSCLITE_HP_PRODKEY_NAME, &productIDs)
 			GET_KEY(PCSCLITE_HP_NAMEKEY_NAME, &readerNames)
+
+			if  ((list_size(manuIDs) != list_size(productIDs))
+				|| (list_size(manuIDs) != list_size(readerNames)))
+			{
+				Log2(PCSC_LOG_CRITICAL, "Error parsing %s", fullPath);
+				return -1;
+			}
 
 			/* Get CFBundleName */
 			rv = LTPBundleFindValueWithKey(&plist, PCSCLITE_HP_CFBUNDLE_NAME,




More information about the Pcsclite-cvs-commit mailing list