Le 23/03/11 16:31, Harald Welte a écrit :
Hi Ludovic,
thanks for your response.
On Wed, Mar 23, 2011 at 02:18:46PM +0100, Ludovic Rousseau wrote:
Can you rebuild pcscd in debug mode and run it inside gdb to get a
backtrace?
I already did that and I already sent another message to this bug indicating
where exactly it crashes and why...
There is nothing 'unusual' in the backtrace, it really just is that:
In function HPRescanUsbBus():
parent = udev_device_get_devnode(parent);
udev_device_get_devnode() returns NULL (which is possible, according to
http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/libudev-udev-device.html#udev-device-get-devnode),
but pcscd uses this result unverified later in a strdup().
Since only pcscd is involved you can run it directly from the source
directory within installing it.
yes, that's what I did.
Try with the attached patch.
But I would like a have a complete pcscd log using "pcscd --foreground
--debug --apdu"
Also I can't find a line:
parent = udev_device_get_devnode(parent);
What I have is:
devpath = udev_device_get_devnode(parent);
--
Dr. Ludovic Rousseau
Index: src/hotplug_libudev.c
===================================================================
--- src/hotplug_libudev.c (revision 5666)
+++ src/hotplug_libudev.c (working copy)
@@ -365,7 +365,8 @@ static void HPAddDevice(struct udev_devi
}
readerTracker[i].fullName = strdup(fullname);
- readerTracker[i].devpath = strdup(devpath);
+ if (devpath)
+ readerTracker[i].devpath = strdup(devpath);
readerTracker[i].status = READER_PRESENT;
readerTracker[i].bInterfaceNumber = bInterfaceNumber;