diff options
author | Dmitry Eremin <dmitry.eremin@intel.com> | 2015-11-04 13:40:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-23 08:44:22 +0100 |
commit | fcee2927c0578c07c16f211b3bb674734032bb18 (patch) | |
tree | 5181734fd9d12b523c9818f1995ae4c20eb2b64f /drivers/staging/lustre/lustre/include/lustre_disk.h | |
parent | b48715dcf16b4379823ae64b08c2d2cfd13a6432 (diff) |
staging: lustre: fix buffer overflow of string buffer
commit 9563fe8a2de9db5eb087fe0e48ec335ee66f8f41 upstream.
Buffer overflow of string buffer due to non null terminated string.
Use strlcpy() when it's justifiable.
Use sizeof(var) instead of constants.
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/lustre/include/lustre_disk.h')
-rw-r--r-- | drivers/staging/lustre/lustre/include/lustre_disk.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h b/drivers/staging/lustre/lustre/include/lustre_disk.h index 5e1ac129a681..7c6933ffc9c1 100644 --- a/drivers/staging/lustre/lustre/include/lustre_disk.h +++ b/drivers/staging/lustre/lustre/include/lustre_disk.h @@ -68,6 +68,7 @@ everything as string options */ #define LMD_MAGIC 0xbdacbd03 +#define LMD_PARAMS_MAXLEN 4096 /* gleaned from the mount command - no persistent info here */ struct lustre_mount_data { |