Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2019 01:04:23 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r343371 - stable/11/sys/dev/ocs_fc
Message-ID:  <201901240104.x0O14Ntd041865@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Jan 24 01:04:23 2019
New Revision: 343371
URL: https://svnweb.freebsd.org/changeset/base/343371

Log:
  MFC r343348:
  ocs_fc: Ensure that we zero-initialize memory before copying it out.
  
  admbugs:	765

Modified:
  stable/11/sys/dev/ocs_fc/ocs_mgmt.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ocs_fc/ocs_mgmt.c
==============================================================================
--- stable/11/sys/dev/ocs_fc/ocs_mgmt.c	Thu Jan 24 01:03:12 2019	(r343370)
+++ stable/11/sys/dev/ocs_fc/ocs_mgmt.c	Thu Jan 24 01:04:23 2019	(r343371)
@@ -851,6 +851,7 @@ ocs_mgmt_firmware_write(ocs_t *ocs, char *name, void *
 		if (arg_out_length > sizeof(status_str)) {
 			arg_out_length = sizeof(status_str);
 		}
+		ocs_memset(status_str, 0, sizeof(status_str));
 		ocs_snprintf(status_str, arg_out_length, "%d", change_status);
 		if (ocs_copy_to_user(arg_out, status_str, arg_out_length)) {
 			ocs_log_test(ocs, "copy to user failed for change_status\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901240104.x0O14Ntd041865>