bin/147654: [patch] fix unitialized mfi_unit value passed to
mfiutil(8) / mptutil(8)
Garrett Cooper
gcooper at FreeBSD.org
Mon Jun 7 16:00:17 UTC 2010
>Number: 147654
>Category: bin
>Synopsis: [patch] fix unitialized mfi_unit value passed to mfiutil(8) / mptutil(8)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 07 16:00:17 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: 9-CURRENT
>Organization:
Cisco Systems, Inc.
>Environment:
FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r206173M: Mon Apr 26 22:45:06 PDT 2010 root at bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA.ata amd64
>Description:
The value of mpt_unit can be undefined (depending on how the stack is allocated) if -u isn't passed to the command. This patch explicitly notes that the default mpt_unit is unit 0 in both mfiutil(8) and mptutil(8).
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: mfiutil/mfiutil.c
===================================================================
--- mfiutil/mfiutil.c (revision 206173)
+++ mfiutil/mfiutil.c (working copy)
@@ -43,7 +43,7 @@
MFI_TABLE(top, stop);
MFI_TABLE(top, abort);
-int mfi_unit;
+int mfi_unit = 0;
static void
usage(void)
Index: mptutil/mptutil.c
===================================================================
--- mptutil/mptutil.c (revision 206173)
+++ mptutil/mptutil.c (working copy)
@@ -42,7 +42,7 @@
SET_DECLARE(MPT_DATASET(top), struct mptutil_command);
-int mpt_unit;
+int mpt_unit = 0;
static void
usage(void)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list