Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2019 01:03:13 +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-12@freebsd.org
Subject:   svn commit: r343370 - stable/12/sys/dev/ocs_fc
Message-ID:  <201901240103.x0O13DXA041778@repo.freebsd.org>

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

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

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

Modified: stable/12/sys/dev/ocs_fc/ocs_mgmt.c
==============================================================================
--- stable/12/sys/dev/ocs_fc/ocs_mgmt.c	Thu Jan 24 01:03:00 2019	(r343369)
+++ stable/12/sys/dev/ocs_fc/ocs_mgmt.c	Thu Jan 24 01:03:12 2019	(r343370)
@@ -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?201901240103.x0O13DXA041778>