openocd/src
Jörg Wunsch 0c7db47e58 Prevent segfault when the USB product string cannot be retrieved
In the CMSIS-DAP driver, if nothing has been specified by the user, an
attempt is made to find the first device with the (mandatory)
substring "CMSIS-DAP" in any USB device's product string.  However,
while (usually) all devices can be traversed, devices the user does
not have permission for cannot be read the product string from,
resulting in a NULL pointer.  Trying to find the substring "CMSIS-DAP"
causes a segementation fault then.

This has also been filed as Trac bug #67:

https://sourceforge.net/apps/trac/openocd/ticket/67

Change-Id: Idfc9f072e34152e9af99fe1c8ec88c99dea4624c
Signed-off-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-on: http://openocd.zylin.com/2044
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-17 12:48:29 +00:00
..
flash stm32f2x.c: Add STM32F401xE device id. 2014-03-17 12:47:44 +00:00
helper command: Fix formatting for empty usage string 2014-01-09 13:21:51 +00:00
jtag Prevent segfault when the USB product string cannot be retrieved 2014-03-17 12:48:29 +00:00
pld update files to correct FSF address 2013-06-05 19:52:42 +00:00
rtos Constify received GDB packet 2014-03-04 20:17:34 +00:00
server gdb_server: do not copy feature names for tdesc generation 2014-03-17 12:42:26 +00:00
svf svf: off-by-one error; do not access after the allocated memory 2013-09-13 19:34:46 +00:00
target flash: Constify write buffer 2014-03-17 12:47:18 +00:00
transport update files to correct FSF address 2013-06-05 19:52:42 +00:00
xsvf update files to correct FSF address 2013-06-05 19:52:42 +00:00
hello.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
hello.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
main.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
Makefile.am cmsis-dap: add initial cmsis-dap support 2014-01-09 15:20:51 +00:00
openocd.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
openocd.h update files to correct FSF address 2013-06-05 19:52:42 +00:00