修改编译错误。
This commit is contained in:
@@ -1840,8 +1840,8 @@ static char* parse_alpn_extension(const unsigned char* buff, size_t buff_len, en
|
||||
*result = CHELLO_PARSE_INVALID_FORMAT;
|
||||
return NULL;
|
||||
}
|
||||
char* alpn = (char*)malloc(len + 1);
|
||||
strncpy(alpn, (const char*)buff + 2, len);
|
||||
char* alpn = ALLOC(char, len + 1);
|
||||
strncpy((char*)alpn, (const char*)buff + 2, len);
|
||||
alpn[len] = '\0';
|
||||
*result = CHELLO_PARSE_SUCCESS;
|
||||
return alpn;
|
||||
|
||||
Reference in New Issue
Block a user