diff --git a/mdig/mdig.c b/mdig/mdig.c index aa7abc5..b3bc115 100644 --- a/mdig/mdig.c +++ b/mdig/mdig.c @@ -189,7 +189,7 @@ static void *t_resolver(void *arg) { int tid = (int)(size_t)arg; int i, r; - char dom[256], is_ok; + char dom[256], is_ok = 0; struct addrinfo hints; struct addrinfo *result; diff --git a/nfq/desync.c b/nfq/desync.c index 689a0c7..b7c529b 100644 --- a/nfq/desync.c +++ b/nfq/desync.c @@ -484,8 +484,8 @@ static uint8_t dpi_desync_tcp_packet_play(bool replay, size_t reasm_offset, uint struct sockaddr_storage src, dst; uint8_t pkt1[DPI_DESYNC_MAX_FAKE_LEN+100], pkt2[DPI_DESYNC_MAX_FAKE_LEN+100]; size_t pkt1_len, pkt2_len; - uint8_t ttl_orig,ttl_fake,flags_orig,scale_factor; - uint32_t *timestamps; + uint8_t ttl_orig,ttl_fake = 0, flags_orig = 0,scale_factor = 0; + uint32_t *timestamps = NULL; ttl_orig = ip ? ip->ip_ttl : ip6hdr->ip6_ctlun.ip6_un1.ip6_un1_hlim; uint32_t desync_fwmark = fwmark | params.desync_fwmark; diff --git a/nfq/protocol.c b/nfq/protocol.c index c718c35..a0d23b7 100644 --- a/nfq/protocol.c +++ b/nfq/protocol.c @@ -132,7 +132,7 @@ bool HttpReplyLooksLikeDPIRedirect(const uint8_t *data, size_t len, const char * } size_t HttpPos(enum httpreqpos tpos_type, size_t hpos_pos, const uint8_t *http, size_t sz) { - const uint8_t *method, *host; + const uint8_t *method, *host = NULL; int i; switch(tpos_type) @@ -352,7 +352,7 @@ static uint8_t tvb_get_size(uint8_t tvb) bool IsQUICCryptoHello(const uint8_t *data, size_t len, size_t *hello_offset, size_t *hello_len) { size_t offset = 1; - uint64_t coff, clen; + uint64_t coff = 0, clen = 0; if (len < 3 || *data != 6) return false; if ((offset+tvb_get_size(data[offset])) >= len) return false; offset += tvb_get_varint(data + offset, &coff); @@ -557,7 +557,7 @@ bool QUICDecryptInitial(const uint8_t *data, size_t data_len, uint8_t *clean, si return false; } - uint64_t payload_len,token_len; + uint64_t payload_len, token_len = 0; size_t pn_offset; pn_offset = 1 + 4 + 1 + data[5]; if (pn_offset >= data_len) return false; @@ -618,7 +618,7 @@ bool QUICDefragCrypto(const uint8_t *clean,size_t clean_len, uint8_t *defrag,siz size_t defrag_data_len = *defrag_len-10; uint8_t ft; - uint64_t offset,sz,szmax=0,zeropos=0,pos=0; + uint64_t offset=0,sz=0,szmax=0,zeropos=0,pos=0; bool found=false; while(pos QUIC_MAX_CID_LENGTH) return false; diff --git a/tpws/protocol.c b/tpws/protocol.c index 9aff70f..1892bbf 100644 --- a/tpws/protocol.c +++ b/tpws/protocol.c @@ -132,7 +132,7 @@ bool HttpReplyLooksLikeDPIRedirect(const uint8_t *data, size_t len, const char * } size_t HttpPos(enum httpreqpos tpos_type, size_t hpos_pos, const uint8_t *http, size_t sz) { - const uint8_t *method, *host; + const uint8_t *method, *host = NULL; int i; switch(tpos_type)