提交 063c0502 编写于 作者: B Bodo Möller

Avoid sprintf.

上级 2ea09100
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册