diff options
author | tianzhishuizhu <tianzhishuizhu5@gamil.com> | 2016-09-08 17:02:50 +0800 |
---|---|---|
committer | tianzhishuizhu <tianzhishuizhu5@gamil.com> | 2016-09-08 17:02:50 +0800 |
commit | ce3493952b5c91e38cf70368d466fd006055def9 (patch) | |
tree | c9827ad64744b4f4206d70a1478622b521373828 /src | |
parent | ac8aaf0e08846d652e16abd46465d5c0f864de9a (diff) |
logical error
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/protocols/mgcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/mgcp.c b/src/lib/protocols/mgcp.c index feffe85c0..779caa0eb 100644 --- a/src/lib/protocols/mgcp.c +++ b/src/lib/protocols/mgcp.c @@ -51,7 +51,7 @@ __forceinline static /* information about MGCP taken from http://en.wikipedia.org/wiki/MGCP */ - u_int16_t pos = 4; + u_int16_t pos = 5; if (packet->payload_packet_len < 8) { goto mgcp_excluded; @@ -77,7 +77,7 @@ __forceinline static goto mgcp_excluded; } // now search for string "MGCP " in the rest of the message - while ((pos + 5) < packet->payload_packet_len) { + while ((pos + 4) < packet->payload_packet_len) { if (memcmp(&packet->payload[pos], "MGCP ", 5) == 0) { NDPI_LOG(NDPI_PROTOCOL_MGCP, ndpi_struct, NDPI_LOG_DEBUG, "MGCP match.\n"); ndpi_int_mgcp_add_connection(ndpi_struct, flow); |