修复笔误导致的段错误。

This commit is contained in:
zhengchao
2019-05-24 20:51:26 +08:00
parent eba9031b86
commit 4bac00157b

View File

@@ -68,8 +68,8 @@ static void ssl_svc_free_server_st(void * data)
static size_t ssl_svc_client_st_mk_key(const struct ssl_chello* chello, char* key_buff, size_t sz)
{
size_t key_len=0;
key_len=snprintf(key_buff, sz, "%d.%d-%d.%d:%s:%s:%s:", chello->min_version.major, chello->min_version.minor,
chello->max_version.major, chello->max_version.minor,
key_len=snprintf(key_buff, sz, "%d:%d:%s:%s:", chello->min_version.ossl_format,
chello->max_version.ossl_format,
chello->sni, chello->alpn?chello->alpn:"null");
if(chello->cipher_suites && sz-key_len>chello->cipher_suites_len)
{