summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.net>2017-06-05 23:20:35 +0000
committerDan McDonald <danmcd@joyent.com>2017-06-12 10:48:57 -0400
commit5400f871d9d59398f2c72ca8320aad07c6caa49c (patch)
tree68878f5d5241741df03683bc9341f8709ca2e763
parent2e10def11ef1a50c25efa2444482670e6b0654ff (diff)
downloadillumos-joyent-5400f871d9d59398f2c72ca8320aad07c6caa49c.tar.gz
8350 mr_sas - replace sprintf() with snprintf()
Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/mr_sas/mr_sas.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/mr_sas/mr_sas.c b/usr/src/uts/common/io/mr_sas/mr_sas.c
index 4e3fe4dcce..c0fdf5c8db 100644
--- a/usr/src/uts/common/io/mr_sas/mr_sas.c
+++ b/usr/src/uts/common/io/mr_sas/mr_sas.c
@@ -891,7 +891,8 @@ mrsas_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
instance->unroll.scsictl = 1;
- (void) sprintf(instance->iocnode, "%d:lsirdctl", instance_no);
+ (void) snprintf(instance->iocnode, sizeof (instance->iocnode),
+ "%d:lsirdctl", instance_no);
/*
* Create a node for applications
@@ -1707,7 +1708,7 @@ mrsas_find_child(struct mrsas_instance *instance, uint16_t tgt, uint8_t lun)
char addr[SCSI_MAXNAMELEN];
char tmp[MAXNAMELEN];
- (void) sprintf(addr, "%x,%x", tgt, lun);
+ (void) snprintf(addr, sizeof (addr), "%x,%x", tgt, lun);
for (child = ddi_get_child(instance->dip); child;
child = ddi_get_next_sibling(child)) {