svn commit: r343370 - stable/12/sys/dev/ocs_fc
Mark Johnston
markj at FreeBSD.org
Thu Jan 24 01:03:16 UTC 2019
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");
More information about the svn-src-stable
mailing list