From 97b80a8838a5187163eef3a54a711a8c0cee8742 Mon Sep 17 00:00:00 2001 From: Nardi Ivan Date: Mon, 24 Aug 2020 13:53:36 +0200 Subject: QUIC: minor fixes LGTM found a real issue on a boundary check Fix unit tests: a pcap ha been uploaded twice (with different names) Fix compilation when using DPDK (see #990) --- src/lib/protocols/quic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/protocols/quic.c') diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c index 0120af850..d40b4219b 100644 --- a/src/lib/protocols/quic.c +++ b/src/lib/protocols/quic.c @@ -845,7 +845,7 @@ static const uint8_t *get_crypto_data(struct ndpi_detection_module_struct *ndpi_ uint64_t unused; counter = 0; - while(clear_payload[counter] == 0 && counter < clear_payload_len) + while(counter < clear_payload_len && clear_payload[counter] == 0) counter += 1; if(counter >= clear_payload_len) return NULL; -- cgit v1.2.3