From a9771bc0eb5f8e04639acd2bdca223a65970f8e5 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Thu, 14 Mar 2019 16:23:30 -0700 Subject: [PATCH] Fix signed/unsigned comparison compiler warning --- CHANGES | 4 ++++ VERSION | 2 +- src/analyzer/protocol/udp/UDP.cc | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 08597b2422..e3f9dbc5d6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +2.6-158 | 2019-03-14 16:23:30 -0700 + + * Fix signed/unsigned comparison compiler warning (Jon Siwek, Corelight) + 2.6-157 | 2019-03-14 16:18:13 +0000 * GH-250: Add VXLAN decapsulation support (Henrik Lund Kramshoej; Jon Siwek, Corelight) diff --git a/VERSION b/VERSION index cb44fc556f..511bef9b6d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6-157 +2.6-158 diff --git a/src/analyzer/protocol/udp/UDP.cc b/src/analyzer/protocol/udp/UDP.cc index b887eea5c1..ae56d8d22d 100644 --- a/src/analyzer/protocol/udp/UDP.cc +++ b/src/analyzer/protocol/udp/UDP.cc @@ -67,7 +67,7 @@ void UDP_Analyzer::DeliverPacket(int len, const u_char* data, bool is_orig, constexpr auto eth_len = 14; if ( validate_checksum && - len > (sizeof(struct udphdr) + vxlan_len + eth_len) && + len > ((int)sizeof(struct udphdr) + vxlan_len + eth_len) && (data[0] & 0x08) == 0x08 ) { auto& vxlan_ports = analyzer_mgr->GetVxlanPorts();