diff options
author | Bodo Möller <bodo@openssl.org> | 2000-05-21 14:17:01 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-05-21 14:17:01 +0000 |
commit | 063c0502ef40e19900fe9fe21daa13ed78202a3f (patch) | |
tree | 5686628edcaf5bce3a3e5a82ae81d75a87a66423 /ssl/ssl_ciph.c | |
parent | 2ea091003177be67c644dc86f0f600e731f87963 (diff) | |
download | openssl-063c0502ef40e19900fe9fe21daa13ed78202a3f.tar.gz |
Avoid sprintf.
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r-- | ssl/ssl_ciph.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 7436a50ad1..a5b2b97056 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -975,13 +975,14 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) if (buf == NULL) { - buf=Malloc(128); + len=128; + buf=Malloc(len); if (buf == NULL) return("Malloc Error"); } else if (len < 128) return("Buffer too small"); - sprintf(buf,format,cipher->name,ver,kx,au,enc,mac,exp); + BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp); return(buf); } |