diff options
author | Dmitry Eremin <dmitry.eremin@intel.com> | 2016-03-12 18:00:32 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-28 14:30:36 (GMT) |
commit | ea25f451a063e1934402fab578d85ea8254d3dee (patch) | |
tree | b32e01bc78fb2e6a8f8ab7d104a6e5b1c18e3795 /drivers/staging/lustre/lnet/selftest | |
parent | bde98b0603cf6ebdf2d5aea7f83f02f88aa35a7f (diff) | |
download | linux-ea25f451a063e1934402fab578d85ea8254d3dee.tar.xz |
staging: lustre: add missing buffer overflow fix for console.c
Patch 9389 change a strncpy call into a strlcpy call. This was
missed in the merger into the upstream client.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9389
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest')
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 1a923ea..c009ad3 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -1749,7 +1749,7 @@ lstcon_session_new(char *name, int key, unsigned feats, if (strlen(name) > sizeof(console_session.ses_name) - 1) return -E2BIG; - strncpy(console_session.ses_name, name, + strlcpy(console_session.ses_name, name, sizeof(console_session.ses_name)); rc = lstcon_batch_add(LST_DEFAULT_BATCH); |