Fix integer signedness comparison warning with GCC 12.2

This fixes a "warning: comparison of integer expressions of different
signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’".
This commit is contained in:
Christian Kreibich 2023-03-16 18:10:59 -07:00
parent 61a5a16ed0
commit 2eabbd2a0d

View file

@ -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<size_t>(13) + client_id_length + auth_length) )
return false;
// There's 9 bytes at the end of the header for a nonce value and a