aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-07-15 04:28:12 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-07-15 04:28:12 +0000
commitf1c4468bc5353fa361029e790b3ab370d22d5101 (patch)
treea54fd4eff8a43d3aa764fd3de14897e5f2517e19 /lib
parenta51fa77e373d1e4a1be10e8e4ef9a87547d26e86 (diff)
downloadsg3_utils-f1c4468bc5353fa361029e790b3ab370d22d5101.tar.gz
sg_inq+sg_vpd: JSON work continues
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@960 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib')
-rw-r--r--lib/sg_pr2serr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sg_pr2serr.c b/lib/sg_pr2serr.c
index a7bdeaf2..05ea8e31 100644
--- a/lib/sg_pr2serr.c
+++ b/lib/sg_pr2serr.c
@@ -1256,7 +1256,7 @@ sgj_pr_js_designation_descriptor(sgj_state * jsp, sgj_opaque_p jop,
if (jsp->pr_hex)
sgj_add_nv_hex_bytes(jsp, jop, "scsi_name_string_hexbytes",
ip, dlen);
- snprintf(b, blen, "%s", ip);
+ snprintf(b, blen, "%.*s", dlen, ip);
sgj_add_nv_s(jsp, jop, "scsi_name_string", b);
break;
case 9: /* Protocol specific port identifier */