summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_alt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509v3/v3_alt.c')
-rw-r--r--crypto/x509v3/v3_alt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c
index ad6cb08e20..c29eff8a91 100644
--- a/crypto/x509v3/v3_alt.c
+++ b/crypto/x509v3/v3_alt.c
@@ -137,13 +137,15 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
case GEN_IPADD:
p = gen->d.ip->data;
if(gen->d.ip->length == 4)
- sprintf(oline, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
+ BIO_snprintf(oline, sizeof oline,
+ "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
else if(gen->d.ip->length == 16)
{
oline[0] = 0;
for (i = 0; i < 8; i++)
{
- sprintf(htmp, "%X", p[0] << 8 | p[1]);
+ BIO_snprintf(htmp, sizeof htmp,
+ "%X", p[0] << 8 | p[1]);
p += 2;
strcat(oline, htmp);
if (i != 7)