openocd/src
Marc Schink 674141e8a7 helper: Make unhexify() robust on invalid data
The current implementation is not suitable for user provided data
because it does not detect invalid inputs in many cases. For example,
the string "aa0xbb" is successfully converted to the 3 bytes: 0xaa,
0x00 and 0xbb. An other example is "aabi" which is successfully
converted to the 2 bytes: 0xaa and 0x0b. Both are obviously incorrect.

Make unhexify() robust on invalid data and use more appropriate data
types for its parameters. Also, add a small documentation for the
function.

Change-Id: Idb799beb86fc608b066c8a76365021ed44c7f890
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/3792
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-17 09:28:05 +01:00
..
flash flash Kinetis: fix mdm check_security regression in JTAG mode 2016-10-17 09:17:37 +01:00
helper helper: Make unhexify() robust on invalid data 2016-10-17 09:28:05 +01:00
jtag helper: Make unhexify() robust on invalid data 2016-10-17 09:28:05 +01:00
pld Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
rtos helper: Make unhexify() robust on invalid data 2016-10-17 09:28:05 +01:00
server helper: Make unhexify() robust on invalid data 2016-10-17 09:28:05 +01:00
svf Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
target target: Clean up format strings 2016-10-17 09:23:13 +01:00
transport Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
xsvf Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
hello.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
Makefile.am Makefile.am: link libusb-1.0 after libusb-0.1 to fix dependencies 2015-02-04 21:56:45 +00:00
openocd.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00