From e4a7990a4e4842b4e6f5b10fb51ab288fa340240 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 17 Jan 2022 19:47:27 +0100 Subject: H323: fix a use-after-poison error (#1412) Detected by oss-fuzz See: https://oss-fuzz.com/testcase-detail/6730505580576768 Fix a function prototype Update a unit test results --- src/lib/protocols/h323.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/protocols/h323.c') diff --git a/src/lib/protocols/h323.c b/src/lib/protocols/h323.c index d7fba5f81..7774b9d0a 100644 --- a/src/lib/protocols/h323.c +++ b/src/lib/protocols/h323.c @@ -94,7 +94,7 @@ void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct n } /* H323 */ if(sport == 1719 || dport == 1719) { - if((packet->payload_packet_len >= 5) + if((packet->payload_packet_len > 5) && (packet->payload[0] == 0x16) && (packet->payload[1] == 0x80) && (packet->payload[4] == 0x06) -- cgit v1.2.3