[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 02/28] ccid-card-emul: do not crash if backend is
From: |
Alon Levy |
Subject: |
[Qemu-devel] [PATCH v3 02/28] ccid-card-emul: do not crash if backend is not provided |
Date: |
Mon, 22 Apr 2013 18:04:32 +0300 |
From: Marc-André Lureau <address@hidden>
Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
164 movdqu (%rsi), %xmm2
(gdb) bt
at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:477
at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:503
---
hw/usb/ccid-card-emulated.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index d534c94..6cbb176 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -473,6 +473,9 @@ static uint32_t parse_enumeration(char *str,
{
uint32_t ret = not_found_value;
+ if (str == NULL)
+ return 0;
+
while (table->name != NULL) {
if (strcmp(table->name, str) == 0) {
ret = table->value;
--
1.8.2
- [Qemu-devel] [PATCH v3 00/28] ccid and libcacard fixes for windows/mingw, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 02/28] ccid-card-emul: do not crash if backend is not provided,
Alon Levy <=
- [Qemu-devel] [PATCH v3 01/28] libcacard: correct T0 historical bytes size, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 04/28] ccid: declare DEFAULT_ATR table to be "static const", Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 03/28] ccid: make backend_enum_table "static const" and adjust users, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 07/28] build-sys: must link with -fstack-protector, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 08/28] libcacard: fix mingw64 cross-compilation, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 06/28] util: move socket_init() to osdep.c, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 05/28] libcacard: use system config directory for nss db on win32, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 09/28] libcacard: split vscclient main() from socket reading, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 13/28] libcacard: remove default libcoolkey loading, Alon Levy, 2013/04/22
- [Qemu-devel] [PATCH v3 12/28] libcacard: remove sql: prefix, Alon Levy, 2013/04/22