Print this page
12093 devid_scsi_encode() should use a static format string

@@ -23,10 +23,14 @@
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*
+ * Copyright 2019 Joyent, Inc.
+ */
+
+/*
  * These functions are used to encode SCSI INQUIRY data into
  * Solaris devid / guid values.
  */
 
 #ifndef _KERNEL

@@ -230,11 +234,11 @@
                                     sizeof (inq_std->inq_pid));
                                 (void) strcat(msg, " ");
                                 (void) strncat(msg, inq_std->inq_revision,
                                     sizeof (inq_std->inq_revision));
                                 (void) strcat(msg, "\n");
-                                cmn_err(CE_WARN, msg);
+                                cmn_err(CE_WARN, "%s", msg);
                                 kmem_free(msg,
                                     MSG_NOT_STANDARDS_COMPLIANT_SIZE);
                         }
 #endif  /* _KERNEL */
                 }