Le lundi 05 janvier 2004 � 20:42:54, Ludovic Rousseau a �crit:
> Le dimanche 21 d�cembre 2003 � 11:38:10, sh a �crit:
> > here comes the result of the backtrace:
> >
> > (gdb) run
> > Starting program: /usr/sbin/pcscd -f -d stdout
> > Reading symbols for shared libraries ..... done
> > src/PCSC/pcscdaemon.c:266 main: pcscd set to foreground
> > src/PCSC/pcscdaemon.c:280 main: debug messages to stdout
> > src/PCSC/pcscdaemon.c:469 main: warning: no reader.conf found
> >
> > src/PCSC/pcscdaemon.c:487 main: pcsc-lite daemon ready.
> >
> > Program received signal EXC_BAD_ACCESS, Could not access memory.
> > 0x00000000 in ?? ()
> > (gdb) bt
> > #0 0x00000000 in ?? ()
> > Cannot access memory at address 0x0
> > Cannot access memory at address 0x0
> > #1 0x901a4e80 in CFStringGetCStringPtr ()
> > #2 0x0000535c in ?? ()
> > #3 0x00005e9c in ?? ()
> > #4 0x000068e4 in ?? ()
> > #5 0x00006fcc in ?? ()
> > #6 0x00002650 in ?? ()
> > #7 0x000024c4 in ?? ()
> > (gdb)
>
> The CFStringGetCStringPtr() calls are in PCSC/src/hotplug_macosx.c
I found a bug in PCSC/src/hotplug_macosx.c. Maybe that was the problem
you describe.
Can you apply the attached patch and tell me if this solves your problem?
Bye,
--
Dr. Ludovic Rousseau [EMAIL PROTECTED]
-- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --
Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv9434/PCSC/src
Modified Files:
hotplug_macosx.c
Log Message:
buffer overflow: the driver list was not terminated and caused crashes.
Index: hotplug_macosx.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_macosx.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- hotplug_macosx.c 21 Oct 2003 20:47:22 -0000 1.14
+++ hotplug_macosx.c 8 Jan 2004 15:24:55 -0000 1.15
@@ -3,7 +3,7 @@
*
* MUSCLE SmartCard Development ( http://www.linuxnet.com )
*
- * Copyright (C) 2002
+ * Copyright (C) 2002-2004
* Stephen M. Webb <[EMAIL PROTECTED]>
* Ludovic Rousseau <[EMAIL PROTECTED]>
* David Corcoran <[EMAIL PROTECTED]>
@@ -164,6 +164,11 @@
#ifdef DEBUG_HOTPLUG
DebugLogB("Total of %d readers supported", readersNumber);
#endif
+
+ /* The last entry is an end marker (m_vendorId = 0)
+ * see checks in HPDriversMatchUSBDevices:503
+ * and HPDriverVectorRelease:376 */
+ readersNumber++;
bundleVector = (HPDriver *) calloc(readersNumber, sizeof(HPDriver));
if (!bundleVector)
_______________________________________________
Pcsclite-cvs-commit mailing list
[EMAIL PROTECTED]
http://lists.alioth.debian.org/mailman/listinfo/pcsclite-cvs-commit