diff options
Diffstat (limited to 'cmd/certutil')
-rw-r--r-- | cmd/certutil/certutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/certutil/certutil.c b/cmd/certutil/certutil.c index a984f7fc8..af72910f3 100644 --- a/cmd/certutil/certutil.c +++ b/cmd/certutil/certutil.c @@ -852,7 +852,7 @@ SECItemToHex(const SECItem *item, char *dst) unsigned char *src = item->data; unsigned int len = item->len; for (; len > 0; --len, dst += 2) { - sprintf(dst, "%02x", *src++); + snprintf(dst, 3, "%02x", *src++); } *dst = '\0'; } @@ -2344,7 +2344,7 @@ getObjectClass(CK_ULONG classType) if (classType >= CKO_NSS && classType <= CKO_NSS_BUILTIN_ROOT_LIST) { return objNSSClassArray[classType - CKO_NSS]; } - sprintf(buf, "0x%lx", classType); + snprintf(buf, sizeof(buf), "0x%lx", classType); return buf; } |