From 0887fe6f2a7c47c45d8f62ad2e08fc13605892c2 Mon Sep 17 00:00:00 2001 From: bol-van Date: Fri, 25 Mar 2022 20:15:09 +0300 Subject: [PATCH] nfqws: remove duplicate check --- nfq/protocol.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/nfq/protocol.c b/nfq/protocol.c index d6d28a4..de65f2a 100644 --- a/nfq/protocol.c +++ b/nfq/protocol.c @@ -469,19 +469,15 @@ bool QUICDefragCrypto(const uint8_t *clean,size_t clean_len, uint8_t *defrag,siz pos += tvb_get_varint(clean+pos, &sz); if ((pos+sz)>clean_len) return false; - - if (ft==6) - { - if ((offset+sz)>defrag_data_len) return false; - if (zeropos < offset) - // make sure no uninitialized gaps exist in case of not full fragment coverage - memset(defrag_data+zeropos,0,offset-zeropos); - if ((offset+sz) > zeropos) - zeropos=offset+sz; - memcpy(defrag_data+offset,clean+pos,sz); - if ((offset+sz) > szmax) szmax = offset+sz; - found=true; - } + if ((offset+sz)>defrag_data_len) return false; + if (zeropos < offset) + // make sure no uninitialized gaps exist in case of not full fragment coverage + memset(defrag_data+zeropos,0,offset-zeropos); + if ((offset+sz) > zeropos) + zeropos=offset+sz; + memcpy(defrag_data+offset,clean+pos,sz); + if ((offset+sz) > szmax) szmax = offset+sz; + found=true; pos+=sz; }