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

Commit ea25f451 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman
Browse files

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: default avatarDmitry 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: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bde98b06
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1749,7 +1749,7 @@ lstcon_session_new(char *name, int key, unsigned feats,


	if (strlen(name) > sizeof(console_session.ses_name) - 1)
	if (strlen(name) > sizeof(console_session.ses_name) - 1)
		return -E2BIG;
		return -E2BIG;
	strncpy(console_session.ses_name, name,
	strlcpy(console_session.ses_name, name,
		sizeof(console_session.ses_name));
		sizeof(console_session.ses_name));


	rc = lstcon_batch_add(LST_DEFAULT_BATCH);
	rc = lstcon_batch_add(LST_DEFAULT_BATCH);