aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/h323.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-01-18 21:52:37 +0100
committerGitHub <noreply@github.com>2022-01-18 21:52:37 +0100
commit9f050fa0a65f3403c1f8296faf5f9d88d4900a8d (patch)
treea288baccd65b73a1614ca8db2d184be7e6cfd257 /src/lib/protocols/h323.c
parentbd036f96f9bf3feb7ef4699b4f9882705b853ed1 (diff)
TLS, H323, examples: fix some memory errors (#1414)
Detected by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26880 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26906 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43782 https://oss-fuzz.com/testcase-detail/6334089358082048
Diffstat (limited to 'src/lib/protocols/h323.c')
-rw-r--r--src/lib/protocols/h323.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/h323.c b/src/lib/protocols/h323.c
index 7774b9d0a..c52ddb0f6 100644
--- a/src/lib/protocols/h323.c
+++ b/src/lib/protocols/h323.c
@@ -46,7 +46,7 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n
NDPI_LOG_DBG2(ndpi_struct, "calculated dport over tcp\n");
/* H323 */
- if(packet->payload_packet_len > 4
+ if(packet->payload_packet_len > 5
&& (packet->payload[0] == 0x03)
&& (packet->payload[1] == 0x00)) {
struct tpkt *t = (struct tpkt*)packet->payload;