aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortheirix <theirix@gmail.com>2016-07-25 18:24:45 +0300
committertheirix <theirix@gmail.com>2016-07-25 18:24:45 +0300
commit384dee1f954e0f425fdba2e05c0642176e85592b (patch)
tree8f9d4644deb8a7b7866177d4ca693d2cf31584a9
parent3e5033ff13225743ee29e5f899f1f72710a04dda (diff)
Fail when Oscar family or type is 0
-rw-r--r--src/lib/protocols/oscar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/protocols/oscar.c b/src/lib/protocols/oscar.c
index 5cd657c22..869b36378 100644
--- a/src/lib/protocols/oscar.c
+++ b/src/lib/protocols/oscar.c
@@ -248,15 +248,15 @@ static void ndpi_search_oscar_tcp_connect(struct ndpi_detection_module_struct
family = get_u_int16_t(packet->payload, 6);
else
family = 0;
- if (family == 0)
- {
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_OSCAR);
- return;
- }
if (packet->payload_packet_len >= 10)
type = get_u_int16_t(packet->payload, 8);
else
type = 0;
+ if (family == 0 || type == 0)
+ {
+ NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_OSCAR);
+ return;
+ }
/* Family 0x0001 */
if (family == htons(GE_SE_CTL))