aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authortianzhishuizhu <tianzhishuizhu5@gamil.com>2016-09-14 16:16:24 +0800
committertianzhishuizhu <tianzhishuizhu5@gamil.com>2016-09-14 16:16:24 +0800
commitd9addc92450219c8f841679eac160e141fe27ef4 (patch)
treefba527ba6e0cb3f2ef87e41a50cfbdb1e1158ce9 /src/lib/protocols
parent2b67b3bc810024ba2175d8045e67a64fdbb9de59 (diff)
check packet udp != NULL
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/ubntac2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/ubntac2.c b/src/lib/protocols/ubntac2.c
index 7763c18d1..3015f4211 100644
--- a/src/lib/protocols/ubntac2.c
+++ b/src/lib/protocols/ubntac2.c
@@ -35,7 +35,7 @@ void ndpi_search_ubntac2(struct ndpi_detection_module_struct *ndpi_struct, struc
NDPI_LOG(NDPI_PROTOCOL_UBNTAC2, ndpi_struct, NDPI_LOG_TRACE, "UBNTAC2 detection... plen:%i %i:%i\n", packet->payload_packet_len, ntohs(packet->udp->source), ntohs(packet->udp->dest));
- if (packet->payload_packet_len >= 135 &&
+ if (packet->udp != NULL && packet->payload_packet_len >= 135 &&
(packet->udp->source == htons(10001) || packet->udp->dest == htons(10001)) &&
memcmp(&(packet->payload[36]), "UBNT", 4) == 0) {