Commit 299ef8cd authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Greg Kroah-Hartman

staging: lustre: lustre: libcfs: workitem.c: Cleaning up missing null-terminate after strncpy call

Added a guaranteed null-terminate after call to strncpy.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec0a38bf
......@@ -365,6 +365,7 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab,
return -ENOMEM;
strncpy(sched->ws_name, name, CFS_WS_NAME_LEN);
sched->ws_name[CFS_WS_NAME_LEN - 1] = '\0';
sched->ws_cptab = cptab;
sched->ws_cpt = cpt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment