Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356512
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/6] staging: lustre: add missing buffer overflow fix for console.c |
| Date | 2016-03-12 19:10 +0100 |
| Message-ID | <rbW9d-1Em-39@gated-at.bofh.it> (permalink) |
| References | <rbW9d-1Em-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Dmitry Eremin <dmitry.eremin@intel.com> 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> --- 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); -- 1.7.1
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/6] Last batch of lnet selftest cleanup James Simmons <jsimmons@infradead.org> - 2016-03-12 19:10 +0100 [PATCH 3/6] staging: lustre: handle error returned from wait_event_timeout seltest timer James Simmons <jsimmons@infradead.org> - 2016-03-12 19:10 +0100 [PATCH 2/6] staging: lustre: add missing buffer overflow fix for console.c James Simmons <jsimmons@infradead.org> - 2016-03-12 19:10 +0100
csiph-web