aboutsummaryrefslogtreecommitdiff
path: root/src/jtag
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2019-02-16 00:23:25 +0100
committerTomas Vanek <vanekt@fbl.cz>2019-03-06 15:35:16 +0000
commit334c5096eb4f6cb82de3a48fe678f6dff4c7e9d3 (patch)
tree4a0e6f61a9b497ff2502c0d1d7bf35027ebcaa2c /src/jtag
parent4db695c66c9240232a0c7a4af494657ea0e18da5 (diff)
gdb_server: fix 'null' pointer passed as 'nonnull' parameter
The null pointer used as second parameter to gdb_put_packet() is passed as second parameter to the memcpy() in line 408 of gdb_put_packet_inner(). In this case memcpy() does not segfault because also the parameter length is zero. Nevertheless, the prototype of memcpy() requires a nonnull pointer. Fixed by passing an empty string in place of the null pointer. Issue highlighted by clang 7.0.0 with warning message: "Null pointer passed as an argument to a 'nonnull' parameter" Change-Id: Ib3dde95d76fcc5fb245ee2d6669e5535d0e0b127 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/4946 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/jtag')
0 files changed, 0 insertions, 0 deletions