Fixed overflow in Oscar

This commit is contained in:
theirix
2016-07-25 15:23:44 +03:00
parent 32e6a79e9c
commit 470901dc58
+4 -1
View File
@@ -244,7 +244,10 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
*/
if (channel == DATA)
{
family = get_u_int16_t(packet->payload, 6);
if (packet->payload_packet_len >= 8)
family = get_u_int16_t(packet->payload, 6);
else
family = 0;
if (packet->payload_packet_len >= 10)
type = get_u_int16_t(packet->payload, 8);
else