Fixed missing length check in fbzero.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -85,9 +85,12 @@ void ndpi_search_fbzero(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *value = (char*)&packet->payload[data_offset + data_prev_offset];
|
||||
u_int tag_len = t->tag_offset_len-data_prev_offset, max_len;
|
||||
ndpi_protocol_match_result ret_match;
|
||||
|
||||
|
||||
max_len = ndpi_min(tag_len, sizeof(flow->host_server_name)-1);
|
||||
|
||||
if (data_offset + data_prev_offset + max_len >= packet->payload_packet_len) {
|
||||
return;
|
||||
}
|
||||
strncpy((char*)flow->host_server_name, value, max_len);
|
||||
flow->host_server_name[max_len] = '\0';
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
Facebook 1 175 1
|
||||
|
||||
1 TCP 10.106.97.215:44933 -> 157.240.13.14:443 [proto: 91.119/TLS.Facebook][cat: SocialNetwork/6][1 pkts/175 bytes -> 0 pkts/0 bytes][Goodput ratio: 62/0][< 1 sec][Plen Bins: 0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
Reference in New Issue
Block a user