]> git.ipfire.org Git - thirdparty/linux.git/commit
gdbstub: Replace strcpy() by strscpy()
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 22 Apr 2019 16:33:42 +0000 (11:33 -0500)
committerDaniel Thompson <daniel.thompson@linaro.org>
Thu, 2 May 2019 12:40:27 +0000 (13:40 +0100)
commit4cc168eaf3b67d76547fb420c22abe22a3c86003
tree7b91471f46b196867f6c5c195c63510eb6879b9e
parenta5d5092c9285f6c8937b56f9c6ff2b22d818fc25
gdbstub: Replace strcpy() by strscpy()

The strcpy() function is being deprecated. Replace it by the safer
strscpy() and fix the following Coverity warning:

"You might overrun the 1024-character fixed-size string remcom_in_buffer
by copying cmd without checking the length."

Addresses-Coverity-ID: 138999 ("Copy into fixed size buffer")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
kernel/debug/gdbstub.c