From 2eabbd2a0d61164a81bac59c02a07df98d45dcea Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Thu, 16 Mar 2023 18:10:59 -0700 Subject: [PATCH] Fix integer signedness comparison warning with GCC 12.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a "warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’". --- src/packet_analysis/protocol/teredo/Teredo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet_analysis/protocol/teredo/Teredo.cc b/src/packet_analysis/protocol/teredo/Teredo.cc index be5eb09d79..efab374028 100644 --- a/src/packet_analysis/protocol/teredo/Teredo.cc +++ b/src/packet_analysis/protocol/teredo/Teredo.cc @@ -291,7 +291,7 @@ bool TeredoAnalyzer::DetectProtocol(size_t len, const uint8_t* data, Packet* pac uint8_t client_id_length = data[2]; uint8_t auth_length = data[3]; - if ( len < (13 + client_id_length + auth_length) ) + if ( len < (static_cast(13) + client_id_length + auth_length) ) return false; // There's 9 bytes at the end of the header for a nonce value and a