aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.seed10
-rw-r--r--src/lib/protocols/h323.c2
-rw-r--r--tests/pcap/h323-overflow.pcapbin0 -> 98 bytes
-rw-r--r--tests/result/h323-overflow.pcap.out3
4 files changed, 9 insertions, 6 deletions
diff --git a/configure.seed b/configure.seed
index 6726a63c9..48f85ca9b 100644
--- a/configure.seed
+++ b/configure.seed
@@ -13,10 +13,10 @@ AS_IF([test "${with_sanitizer+set}" = set],[
LT_INIT
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_CXX
-AC_PROG_CC_STDC
+AC_PROG_CC(clang gcc)
+AM_PROG_CC_C_O(clang gcc)
+AC_PROG_CXX(clang++ g++)
+AC_PROG_CC_STDC(clang gcc)
AC_LANG_WERROR
AX_PTHREAD
@@ -34,7 +34,7 @@ if test -d ".git"; then :
GIT_DATE=`git log -1 --format=%cd`
#
# On CentOS 6 `git rev-list HEAD --count` does not work
- #
+ #
#
GIT_NUM=`git log --pretty=oneline | wc -l | tr -d '[[:space:]]'`
GIT_RELEASE="${PACKAGE_VERSION}-${GIT_NUM}-${GIT_TAG}"
diff --git a/src/lib/protocols/h323.c b/src/lib/protocols/h323.c
index 13ec9d364..1d70a8cec 100644
--- a/src/lib/protocols/h323.c
+++ b/src/lib/protocols/h323.c
@@ -33,7 +33,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 > 4
&& (packet->payload[0] == 0x03)
&& (packet->payload[1] == 0x00)) {
struct tpkt *t = (struct tpkt*)packet->payload;
diff --git a/tests/pcap/h323-overflow.pcap b/tests/pcap/h323-overflow.pcap
new file mode 100644
index 000000000..f6af70ecc
--- /dev/null
+++ b/tests/pcap/h323-overflow.pcap
Binary files differ
diff --git a/tests/result/h323-overflow.pcap.out b/tests/result/h323-overflow.pcap.out
new file mode 100644
index 000000000..2a1d8e7e0
--- /dev/null
+++ b/tests/result/h323-overflow.pcap.out
@@ -0,0 +1,3 @@
+HTTP 1 58 1
+
+ 1 TCP 192.168.1.1:31337 -> 192.168.1.2:80 [proto: 7/HTTP][cat: Web/5][1 pkts/58 bytes -> 0 pkts/0 bytes][Goodput ratio: 7/0][< 1 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]