diff options
| author | peihong huang <Pei-Hong.Huang@Sun.COM> | 2009-02-27 11:20:04 +0800 |
|---|---|---|
| committer | peihong huang <Pei-Hong.Huang@Sun.COM> | 2009-02-27 11:20:04 +0800 |
| commit | 0f59e5a798136b49e7c0666181494da06bd8051e (patch) | |
| tree | e10b5183b4fe7f346d3ec403888e4f838de67d2d | |
| parent | 585995d5d19489bf178112c08c8c61ffc049ff6e (diff) | |
| download | illumos-joyent-0f59e5a798136b49e7c0666181494da06bd8051e.tar.gz | |
6799925 fwflash needs to protect 34 bytes of string data in the ses/sgen plugin
| -rw-r--r-- | usr/src/cmd/fwflash/plugins/transport/common/ses.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/usr/src/cmd/fwflash/plugins/transport/common/ses.c b/usr/src/cmd/fwflash/plugins/transport/common/ses.c index 738b89eefc..30f64b4e2f 100644 --- a/usr/src/cmd/fwflash/plugins/transport/common/ses.c +++ b/usr/src/cmd/fwflash/plugins/transport/common/ses.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -485,10 +485,11 @@ fw_identify(int start) logmsg(MSG_INFO, "Chassis Serial Number: %s\n", newdev->addresses[0]); - } else { - (void) strlcpy(newdev->addresses[0], - "(not supported)", 17); - } + } else + logmsg(MSG_INFO, + "%s: no chassis-serial-number property " + "for device %s\n", + driver, newdev->access_devname); rv = di_prop_lookup_strings(DDI_DEV_T_ANY, @@ -498,8 +499,6 @@ fw_identify(int start) "%s: no target-port property " "for device %s\n", driver, newdev->access_devname); - (void) strlcpy(newdev->addresses[1], - "(not supported)", 17); } else logmsg(MSG_INFO, "target-port property: %s\n", @@ -539,8 +538,10 @@ fw_identify(int start) tempdev->ident->pid, tempdev->ident->revid, tempdev->index, - tempdev->addresses[0], - tempdev->addresses[1], + (tempdev->addresses[0] ? tempdev->addresses[0] : + "(not supported)"), + (tempdev->addresses[1] ? tempdev->addresses[1] : + "(not supported)"), &tempdev->plugin); } } @@ -567,8 +568,10 @@ fw_devinfo(struct devicelist *thisdev) thisdev->ident->vid, thisdev->ident->pid, thisdev->ident->revid, - thisdev->addresses[0], - thisdev->addresses[1]); + (thisdev->addresses[0] ? thisdev->addresses[0] : + "(not supported)"), + (thisdev->addresses[1] ? thisdev->addresses[1] : + "(not supported)")); fprintf(stdout, "\n\n"); |
