mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-25 02:47:06 +00:00
Limit length during server name decoding
This commit is contained in:
parent
47d80c79bd
commit
2a98fb08fe
1 changed files with 1 additions and 0 deletions
|
@ -2969,6 +2969,7 @@ static int decode_server_name_type_host_name(ssl,dir,seg,data)
|
||||||
if (server_name != NULL)
|
if (server_name != NULL)
|
||||||
{
|
{
|
||||||
if (ssl->server_name) free(ssl->server_name);
|
if (ssl->server_name) free(ssl->server_name);
|
||||||
|
if (l > data->len) l = data->len;
|
||||||
memcpy(server_name,data->data,l);
|
memcpy(server_name,data->data,l);
|
||||||
ssl->server_name = server_name;
|
ssl->server_name = server_name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue