Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -365,6 +365,7 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab,
		return -ENOMEM;
		return -ENOMEM;


	strncpy(sched->ws_name, name, CFS_WS_NAME_LEN);
	strncpy(sched->ws_name, name, CFS_WS_NAME_LEN);
	sched->ws_name[CFS_WS_NAME_LEN - 1] = '\0';
	sched->ws_cptab = cptab;
	sched->ws_cptab = cptab;
	sched->ws_cpt = cpt;
	sched->ws_cpt = cpt;