修复ssl_chello_parse中的内存混乱

This commit is contained in:
崔一鸣
2018-09-18 10:47:30 +08:00
parent 48c8d6a659
commit 6abc261634

View File

@@ -1910,7 +1910,10 @@ static char* parse_cipher_suites(struct cipher_suite* _cipher_suite_list, int n,
pos += 2;
}
int len = strnlen(cipher_suites_str, TFE_STRING_MAX);
cipher_suites_str[len-1] = '\0';
if(len > 0)
{
cipher_suites_str[len-1] = '\0';
}
if(pos != buff_len)
{
*result = CHELLO_PARSE_INVALID_FORMAT;