summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorWenlin Kang <wenlin.kang@windriver.com>2019-05-13 16:57:20 +0800
committerDaniel Thompson <daniel.thompson@linaro.org>2019-05-14 13:44:24 +0100
commitca976bfb3154c7bc67c4651ecd144fdf67ccaee7 (patch)
treec14984408a43c210a00b4a24334a52f36462fccc /ipc
parentb586627e10f57ee3aa8f0cfab0d6f7dc4ae63760 (diff)
kdb: Fix bound check compiler warning
The strncpy() function may leave the destination string buffer unterminated, better use strscpy() instead. This fixes the following warning with gcc 8.2: kernel/debug/kdb/kdb_io.c: In function 'kdb_getstr': kernel/debug/kdb/kdb_io.c:449:3: warning: 'strncpy' specified bound 256 equals destination size [-Wstringop-truncation] strncpy(kdb_prompt_str, prompt, CMD_BUFLEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions