gdbstub: fix off-by-one in gdb_handle_packet()
commit9005774b27b6aa5e1c99d80bd59d5d048c2f7077
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 8 Apr 2018 14:59:33 +0000 (8 11:59 -0300)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 9 Apr 2018 13:18:39 +0000 (9 14:18 +0100)
tree1661fcdfa8b14b233ac003124ef8f260695dd84c
parentb2c1742da0c79dd52080260edacaf0a7b6d309e5
gdbstub: fix off-by-one in gdb_handle_packet()

memtohex() adds an extra trailing NUL character.

Reported-by: AddressSanitizer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180408145933.1149-1-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
gdbstub.c